# Apache broken after world update[SOLVED]

## madchaz

I am geting the following when trying to start apache

```
* 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

```

I started geting this after doing a emerge -uD world. 

I tried to do a revdep-rebuild, but it does not fix the issue. Re-emerging apache does not fix it either. 

I did do an etc-update.

----------

## alex.blackbit

maybe expat is broken. try to re-emerge it.

entering "ldd /usr/sbin/apache2" maybe confirms my guess.

----------

## madchaz

 *alex.blackbit wrote:*   

> maybe expat is broken. try to re-emerge it.
> 
> entering "ldd /usr/sbin/apache2" maybe confirms my guess.

 

here is what that gives me

```
raditz apache2 # ldd /usr/sbin/apache2

        linux-gate.so.1 =>  (0xffffe000)

        libpcre.so.0 => /usr/lib/libpcre.so.0 (0xb7ed9000)

        libaprutil-1.so.0 => /usr/lib/libaprutil-1.so.0 (0xb7ebc000)

        libz.so.1 => /lib/libz.so.1 (0xb7ea8000)

        libnsl.so.1 => /lib/libnsl.so.1 (0xb7e92000)

        libm.so.6 => /lib/libm.so.6 (0xb7e6d000)

        libldap-2.3.so.0 => /usr/lib/libldap-2.3.so.0 (0xb7e36000)

        libresolv.so.2 => /lib/libresolv.so.2 (0xb7e23000)

        libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0xb7de3000)

        libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0xb7ca6000)

        liblber-2.3.so.0 => /usr/lib/liblber-2.3.so.0 (0xb7c9a000)

        libgdbm.so.3 => /usr/lib/libgdbm.so.3 (0xb7c94000)

        libdb-4.3.so => /usr/lib/libdb-4.3.so (0xb7bac000)

        libmysqlclient_r.so.15 => /usr/lib/libmysqlclient_r.so.15 (0xb7a4a000)

        libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7a20000)

        libapr-1.so.0 => /usr/lib/libapr-1.so.0 (0xb79fa000)

        libuuid.so.1 => /lib/libuuid.so.1 (0xb79f7000)

        librt.so.1 => /lib/librt.so.1 (0xb79ee000)

        libcrypt.so.1 => /lib/libcrypt.so.1 (0xb79c0000)

        libpthread.so.0 => /lib/libpthread.so.0 (0xb79a8000)

        libdl.so.2 => /lib/libdl.so.2 (0xb79a4000)

        libc.so.6 => /lib/libc.so.6 (0xb787e000)

        libexpat.so.0 => /lib/libexpat.so.0 (0xb7856000)

        /lib/ld-linux.so.2 (0xb7f11000)

```

----------

## alex.blackbit

very strange. why do you have a libexpat in /lib?

that should only be in /usr/lib to my understanding.

hmm. anyway... try to re-emerge expat.

----------

## madchaz

Now, I'm geting module errors. 

Here is what I find in the startup log

```
apache2: Syntax error on line 242 of /etc/apache2/httpd.conf: Cannot load /usr/lib/apache2/modules/mod_access.so into server: /usr/lib/apache2/modules/mod_access.so: cannot open shared object file: No such file or directory

apache2: Syntax error on line 242 of /etc/apache2/httpd.conf: Cannot load /usr/lib/apache2/modules/mod_access.so into server: /usr/lib/apache2/modules/mod_access.so: cannot open shared object file: No such file or directory

apache2: Syntax error on line 243 of /etc/apache2/httpd.conf: Cannot load /usr/lib/apache2/modules/mod_auth.so into server: /usr/lib/apache2/modules/mod_auth.so: cannot open shared object file: No such file or directory

apache2: Syntax error on line 243 of /etc/apache2/httpd.conf: Cannot load /usr/lib/apache2/modules/mod_auth.so into server: /usr/lib/apache2/modules/mod_auth.so: cannot open shared object file: No such file or directory

apache2: Syntax error on line 243 of /etc/apache2/httpd.conf: Cannot load /usr/lib/apache2/modules/mod_auth.so into server: /usr/lib/apache2/modules/mod_auth.so: cannot open shared object file: No such file or directory

apache2: Syntax error on line 243 of /etc/apache2/httpd.conf: Cannot load /usr/lib/apache2/modules/mod_auth.so into server: /usr/lib/apache2/modules/mod_auth.so: cannot open shared object file: No such file or directory

apache2: Syntax error on line 242 of /etc/apache2/httpd.conf: Cannot load /usr/lib/apache2/modules/mod_access.so into server: /usr/lib/apache2/modules/mod_access.so: cannot open shared object file: No such file or directory

apache2: Syntax error on line 242 of /etc/apache2/httpd.conf: Cannot load /usr/lib/apache2/modules/mod_access.so into server: /usr/lib/apache2/modules/mod_access.so: cannot open shared object file: No such file or directory

apache2: Syntax error on line 254 of /etc/apache2/httpd.conf: Cannot load /usr/lib/apache2/modules/mod_charset_lite.so into server: /usr/lib/apache2/modules/mod_charset_lite.so: cannot open shared object file: No such file or directory

apache2: Syntax error on line 254 of /etc/apache2/httpd.conf: Cannot load /usr/lib/apache2/modules/mod_charset_lite.so into server: /usr/lib/apache2/modules/mod_charset_lite.so: cannot open shared object file: No such file or directory
```

I'm re-emerging apache.

----------

## madchaz

not geting ahead. I re-emerged apache and now have even more modules not found.

----------

## Hu

What version of dev-libs/expat do you have installed?  This error message often shows up when someone upgrades expat, particularly to the ABI-breaking expat 2.0.0.  The instructions in that thread should get you back on track.

----------

## madchaz

Yep, that was it. For some reason. I had put the unstable keyword on in make.conf. Removed it and re-did a world update. That downgraded a bunch of packages, including expat. It solved this and another problem I had.

----------

## phatfel

how did you fix this exactly? I'm having the same problems...

----------

## Dargo

Hi there,

a few weeks ago, i had the same problem. try this as root:

```
ln -s /usr/lib/libexpat.so.1.5.2 /usr/lib/libexpat.so.0
```

perhaps not the proper way to fix this.. however it works.

greetings

Micha

----------

## phatfel

no dice...anything else i can try...  :Sad: 

thanks in advance!!

----------

## frameRATE

 *phatfel wrote:*   

> no dice...anything else i can try... 
> 
> thanks in advance!!

 

```
etc-update
```

Some major changes in apache config files. Take the time to catch up any of these you've been putting off. I did, and now it's all back up and running.

----------

## alexis101

Hey guys,

having the exact same problem. I did an etc-update din't change a thing. My expat version is 2.0.0. If that is the problem i can I downgrade it ?

Thanks

----------

