Upgraded from bullseye to bookworm and got httpd error because of libxml2

wila

Verified User
Joined
Dec 15, 2017
Messages
98
Hi,

Finally got to upgrade some of my servers from debian 11 to debian 12 and that was a success.
However I bumped into a pecularity.

First off I had some issues upgrading, so I rolled back and figured to clean up my install via list removals.
eg:
Bash:
da build list_removals
Pure-FTPd: installed, but not enabled in options.conf
        da build remove_pureftpd
imagemagick: deprecated, in favor of system imagemagick
        da build remove_imagemagick
old icu in /usr/local: custom library might mask system libraries, not needed anymore
        da build remove_old_local icu
old freetype in /usr/local: custom library might mask system libraries, not needed anymore
        da build remove_old_local freetype
old libsrs_alt in /usr/local: custom library might mask system libraries, not needed anymore
        da build remove_old_local libsrs_alt
old libxslt in /usr/local: custom library might mask system libraries, not needed anymore
        da build remove_old_local libxslt
old libxml2 in /usr/local: custom library might mask system libraries, not needed anymore
        da build remove_old_local libxml2

If you want to remove all the suggested programs above, run: da build remove_items

I ran each da build remove_ command..
The one that matters here is the libxml2 one.
Bash:
# da build remove_old_local libxml2
creating backup for local package 'libxml2' in '/usr/local/directadmin/custombuild/tmp/usr_local_libxml2_backup.tar.gz'
Removing: /usr/local/include/libxml2
Removing: /usr/local/share/aclocal/libxml.m4
Removing: /usr/local/share/man/man3/libxml.3
Removing: /usr/local/share/man/man1/xmllint.1
Removing: /usr/local/share/man/man1/xml2-config.1
Removing: /usr/local/share/man/man1/xmlcatalog.1
Removing: /usr/local/share/doc/libxml2-2.9.10
Removing: /usr/local/share/gtk-doc/html/libxml2
Removing: /usr/local/lib/cmake/libxml2
Removing: /usr/local/lib/pkgconfig/libxml-2.0.pc
Removing: /usr/local/lib/libxml2.a
Removing: /usr/local/lib/libxml2.la
Removing: /usr/local/lib/libxml2.so
Removing: /usr/local/lib/libxml2.so.2
Removing: /usr/local/lib/libxml2.so.2.9.10
Removing: /usr/local/lib/xml2Conf.sh
Removing: /usr/local/bin/xml2-config
Removing: /usr/local/bin/xmlcatalog
Removing: /usr/local/bin/xmllint

local package 'libxml2' is removed, it can be restored with command:
        da build restore_old_local libxml2
That worked well.. until the reboot.
After the reboot I noticed that the httpd service no longer ran, so I first recompiled httpd again.
and... it refused to start.
Bash:
mod_htscanner2 has been installed successfully.
Restarting apache.
Job for httpd.service failed because the control process exited with error code.
See "systemctl status httpd.service" and "journalctl -xe" for details.
easy enough to check..

Bash:
# systemctl status httpd.service
line 1 of /etc/httpd/conf/extra/httpd-modsecurity.conf: Cannot load /usr/local/lib/libxml2.so
Did a
Bash:
# whereis libxml2.so
libxml2: /usr/lib/x86_64-linux-gnu/libxml2.a /usr/lib/x86_64-linux-gnu/libxml2.so /usr/include/libxml2
Then replaced the line:

#LoadFile /usr/local/lib/libxml2.so
LoadFile /usr/lib/x86_64-linux-gnu/libxml2.so

Bash:
# systemctl restart httpd.service

Problem solved...
or so I thought until I ran a

da build rewrite_confs

as that puts back the old line:
LoadFile /usr/local/lib/libxml2.so
into the file /etc/httpd/conf/extra/httpd-modsecurity.conf instead of the imo correct line:
LoadFile /usr/lib/x86_64-linux-gnu/libxml2.so

How-to resolve that (except from going back to the original libxml2 file) ?

Thanks
 
Hi Romans,

Thanks for the suggestion. I tried that, but no cigar I'm afraid.
Still seeing the same issue.
 
Back
Top