# [solved] Apache/libexpat.so.0 not found/emerge mod_security

## Woldamer

Hi!

I followed the desciption http://gentoo-wiki.com/Apache_Modules_mod_security

And after running "emerge -vauD mod_security" I get this error (w/o "-D SECURITY"):

```
# /etc/init.d/apache2 start

 * Apache2 has detected a syntax error in your configuration files:

/usr/sbin/apache2: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory
```

How should I fix this?

Thanks a lot!

Here some additional information:

```
 # emerge --info

Portage 2.1.1_pre2-r4 (hardened/x86/2.6, gcc-3.4.6/hardened, glibc-2.3.6-r4, 2.6.14-rsbac-r1-rsbac i686)

=================================================================

System uname: 2.6.14-rsbac-r1-rsbac i686 Intel(R) Pentium(R) D CPU 3.00GHz

Gentoo Base System version 1.6.13

dev-lang/python:     2.4.3-r1

dev-python/pycrypto: 2.0.1-r5

dev-util/ccache:     [Not Present]

dev-util/confcache:  [Not Present]

sys-apps/sandbox:    1.2.18.1

sys-devel/autoconf:  2.13, 2.60

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2

sys-devel/binutils:  2.17

sys-devel/gcc-config: 2.0.0_rc1

sys-devel/libtool:   1.5.22

virtual/os-headers:  2.6.11-r5

ACCEPT_KEYWORDS="x86 ~x86"

AUTOCLEAN="yes"

CBUILD="i386-pc-linux-gnu"

CFLAGS="-O2 -march=pentium4"

CHOST="i386-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/eselect/compiler /etc/gconf /etc/java-config/vms/ /etc/terminfo"

CXXFLAGS="-O2 -march=pentium4"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"

GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/ http://gentoo.intergenia.de http://files.gentoo.org http://ftp.ntua.gr/pub/linux/gentoo/ "

MAKEOPTS="-j2"

PKGDIR="/usr/portage//packages/x86/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage/"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="apache2 berkdb bzip2 clamav crypt dlloader doc hardened java ldap mysql nls pam pic readline ssl tcpd threads userlocales x86 xml xorg zlib elibc_glibc input_devices_mouse input_devices_keyboard kernel_linux userland_GNU"

Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
```

Last edited by Woldamer on Mon Jul 17, 2006 11:34 am; edited 2 times in total

----------

## thestick

how about emerging expat , and eventually re-emerging apache.

does this solve it?

----------

## Woldamer

Hi

Only emerge expat don't solve the problem... Rechecking all dependencies was the solution:

```
# emerge gentoolkit

# revdep-rebuild
```

Thanks a lot

----------

## leo.fontenelle

Libexpat 2.0 broke the API; please read this solution for Apache.

----------

## whit

 *leo.fontenelle wrote:*   

> Libexpat 2.0 broke the API

 

It broke a lit of other stuff too. Does someone know, from a operational stance, whether anything would be broken if Gentoo had permitted the old expat lib to stay on the system? This isn't the first time that the preference to strip out anything that's been upgraded has been dangerous to production systems. I know one answer is to keep duplicates of your systems to try all upgrades on first ... but that's a pretty poor answer, really, that you have to buy twice the hardware and go through everything twice just in case. It would be a lot saner if the preference was to leave older libraries that have been widely linked to on the system unless the system owner run some specific command to prune them down.

----------

