Error with libxml2 after upgrade

I am trying to extricate myself after I screwed up an upgrade. I seem to have lost (or messed up a a pointer to) libxml2.xxx

I cannot use timeshift because I get the error

timeshift: error while loading shared libraries: libxml2.so.16: cannot open shared object file: No such file or directory

What can I do?

Hi @psionman,

See this thread and answer, it kind of covers exactly this:

1 Like

Thanks, but this gives me the sort of errors I got before

:: installing libxml2 (2.14.3-1) breaks dependency 'libxml2.so=2-64' required by electron31
:: installing libxml2 (2.14.3-1) breaks dependency 'libxml2.so=2-64' required by electron32
:: installing libxml2 (2.14.3-1) breaks dependency 'libxml2.so=2-64' required by libarchive
:: installing libxml2 (2.14.3-1) breaks dependency 'libxml2.so=2-64' required by openconnect
:: installing libxml2 (2.14.3-1) breaks dependency 'libxml2.so=2-64' required by sane

Are you in a chroot environment?

Also:

:bangbang: Tip :bangbang:

When posting terminal output, copy the output and paste it here, wrapped in three (3) backticks, before AND after the pasted text. Like this:

```
pasted text
```

Or three (3) tilde signs, like this:

~~~
pasted text
~~~

This will just cause it to be rendered like this:

Sed
sollicitudin dolor
eget nisl elit id
condimentum
arcu erat varius
cursus sem quis eros.

Instead of like this:

Sed sollicitudin dolor eget nisl elit id condimentum arcu erat varius cursus sem quis eros.

Alternatively, paste the text you wish to format as terminal output, select all pasted text, and click the </> button on the taskbar. This will indent the whole pasted section with one TAB, causing it to render the same way as described above.

Thereby increasing legibility thus making it easier for those trying to provide assistance.

For more information, please see:

As I’m a moderator on the forum, I have taken the liberty of doing this for you, this time.


:bangbang::bangbang: Additionally

If your language isn’t English, please prepend any and all terminal commands with LC_ALL=C. For example:

LC_ALL=C bluetoothctl

This will just cause the terminal output to be in English, making it easier to understand and debug.

Note that the above text is partially pre-prepared as a general introduction for new forum Users. Please take the time to to understand how it is done and encourage quality responses.

waiting for a wired keyboard!

Good luck!

Those are packages from the AUR. Remove them. You can reinstall them later, and there is a libxml2-legacy package you can install for whatever needs the older version.

2 Likes

I have reinstalled libxml2 usig pacman-static as you suggested

This is what I have in usr/lib


└─(default)  ➜ ls -l usr/lib/libxml2*
lrwxrwxrwx 1 root root      12 Feb 25 00:38 usr/lib/libxml2.so -> libxml2.so.2
lrwxrwxrwx 1 root root      21 May 29 11:11 usr/lib/libxml2.so.13.6 -> /usr/lib/libxml2.so.2
lrwxrwxrwx 1 root root      17 Feb 25 00:38 usr/lib/libxml2.so.2 -> libxml2.so.2.13.6
-rwxr-xr-x 1 root root 1358936 Feb 25 00:38 usr/lib/libxml2.so.2.13.6

But my error persists


└─(default)  ➜ timeshift
timeshift: error while loading shared libraries: libxml2.so.16: cannot open shared object file: No such file or directory

This is mine, a perfectly working, updated installation:

$ ls -l /usr/lib/libxml2*
lrwxrwxrwx 1 root root      13 May 13 17:31 /usr/lib/libxml2.so -> libxml2.so.16
lrwxrwxrwx 1 root root      17 May 13 17:31 /usr/lib/libxml2.so.16 -> libxml2.so.16.0.3
-rwxr-xr-x 1 root root 1297360 May 13 17:31 /usr/lib/libxml2.so.16.0.3

So it would seems yours is out-of-date.

So, while in the chroot environment, update your mirror list and mirrors. Please provide the output of:

pacman-mirrors --fasttrack=3

And, also from there:

pacman-static -S libxml2

And let’s go from there, then. And please don’t just cherry-pick parts of the output that seem important, but provide everything.

└─(default)  ➜ sudo pacman-mirrors --fasttrack=3
::INFO Downloading mirrors from Manjaro
::INFO => Mirror pool: https://repo.manjaro.org/mirrors.json
::INFO => Mirror status: https://repo.manjaro.org/status.json
::INFO Using default mirror file
::INFO Querying mirrors - This may take some time
  1.804 Canada         : https://mirror.xenyth.net/manjaro/
  1.054 United_States  : https://ohioix.mm.fcix.net/manjaro/
  ..... Brazil         : https://manjaro.c3sl.ufpr.br/
::INFO Writing mirror list
::United_States   : https://ohioix.mm.fcix.net/manjaro/stable
::Canada          : https://mirror.xenyth.net/manjaro/stable
::Brazil          : https://manjaro.c3sl.ufpr.br/stable
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist

Working on pacman-static

This is not up to date.
The current version of libxml2 is 2.14

it contains the file which timeshift expects to see:

pacman -F libxml2.so.16
core/libxml2 2.14.3-1 [installed]

here it looks like this:

$ ls -l /usr/lib/libxml2*
lrwxrwxrwx 1 root root      13 13. Mai 17:31 /usr/lib/libxml2.so -> libxml2.so.16
lrwxrwxrwx 1 root root      17 13. Mai 17:31 /usr/lib/libxml2.so.16 -> libxml2.so.16.0.3
-rwxr-xr-x 1 root root 1297360 13. Mai 17:31 /usr/lib/libxml2.so.16.0.3
 ./pacman-static -S libxml2
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing libxml2 (2.14.3-1) breaks dependency 'libxml2.so=2-64' required by electron31
:: installing libxml2 (2.14.3-1) breaks dependency 'libxml2.so=2-64' required by electron32
:: installing libxml2 (2.14.3-1) breaks dependency 'libxml2.so=2-64' required by libarchive
:: installing libxml2 (2.14.3-1) breaks dependency 'libxml2.so=2-64' required by openconnect
:: installing libxml2 (2.14.3-1) breaks dependency 'libxml2.so=2-64' required by sane

is a package from AUR - remove it
at least for the upgrade to succeed

then tend to whatever AUR packages you might still need and rebuild them

electron31 is in the repos - it should not break the dependencies :person_shrugging:

also:
don’t upgrade singe packages
instead do:
pacman -Syu
after you refreshed the list of mirrors:
paman-mirrors -f


└─(default)  ➜ sudo pacman -R electron32                                
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing electron32 breaks dependency 'electron32' required by code

… remove that as well and reinstall it later?

@psionman Try this logic:

Do a full upgrade (and force update database):

./pacman-static -Syyu

if you get:

ignore the packages this time:

./pacman-static -Syu --ignore electron31,electron32,libarchive,openconnect,sane

Do the update and after that without the --ignore parameter. libxml2 needs to be updated first.

2 Likes
./pacman-static -Syu --ignore electron31,electron32,libarchive,openconnect,sane
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 multilib is up to date
:: Starting full system upgrade...
warning: electron31: ignoring package upgrade (31.7.7-3 => 31.7.7-4)
warning: libarchive: ignoring package upgrade (3.7.7-1 => 3.7.9-2)
warning: openconnect: ignoring package upgrade (1:9.12-3 => 1:9.12-4)
warning: sane: ignoring package upgrade (1.3.1-2 => 1.3.1-3)
warning: shortwave: local (1:3.2.0-1) is newer than extra (5.0.0-1)
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing libxml2 (2.14.3-1) breaks dependency 'libxml2.so=2-64' required by electron31
:: installing libxml2 (2.14.3-1) breaks dependency 'libxml2.so=2-64' required by electron32
:: installing libxml2 (2.14.3-1) breaks dependency 'libxml2.so=2-64' required by libarchive
:: installing libxml2 (2.14.3-1) breaks dependency 'libxml2.so=2-64' required by openconnect
:: installing libxml2 (2.14.3-1) breaks dependency 'libxml2.so=2-64' required by sane
./pacman-static -Syu --ignore libxml2,electron31,electron32,libarchive,openconnect,sane

That worked but still get


└─(default)  ➜ timeshift
timeshift: error while loading shared libraries: libxml2.so.16: cannot open shared object file: No such file or directory

Did you do this part?