Search code examples
linuxbashclanglibc

Tries of downgrading libc6 package causes serious problems


I try to set up a local server and during the installation I get an error lined with failing build of librockdb-sys, error below:

Compiling serde_json v1.0.79
Compiling bincode v1.3.3
Compiling secp256k1 v0.22.1
Compiling hyperlocal v0.8.0

error: failed to run custom build command for 'librocksdb-sys v6.20.3'

Caused by: process didn't exit successfully: /home/softwarehouse/electrs/target/release/build/librocksdb-sys-cc5b955581598a2f/build-script-build (exit status: 101) --- stderr thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-.so', 'libclang.so.', 'libclang-.so.'], set the LIBCLANG_PATH environment variable to a path where one of these files can be found (invalid: [])"', /home/softwarehouse/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.59.2/src/lib.rs:2144:31 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace warning: build failed, waiting for other jobs to finish...

This error is lined (imo) with lack of clang, so I try to install it, by sudo apt install clang and I get this error below:

(base) user@user:~/electrs$ sudo apt install clang
Reading package lists...
Done Building dependency tree...
Done Reading state information...
Done Some packages could not be installed.

This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies:
libc6-i386 : Depends: libc6 (= 2.31-0ubuntu9.9) but 2.33-0ubuntu5 is to be installed

E: Unable to correct problems, you have held broken packages.

It for me means that I should downgrade the package libc6 to version 2.31-0ubuntu9.9, but when I try to do it (sudo apt-get install libc6=2.31-0ubuntu9.9), I get choice like this:

0 upgraded, 0 newly installed, 1 downgraded, 1269 to remove and 0 not upgraded.

Need to get 2 722 kB of archives. After this operation, 4 691 MB disk space will be freed. You are about to do something potentially harmful.

To continue type in the phrase 'Yes, do as I say!'

It means that to downgrade that one package I need to remove over 1,2k of packages which are important for system work (like login, etc.). I suppose that I should not accept that solution of this problem, but I have no idea what can I do to properly install that clang package despite of the problems with unmet dependencies around libc6 package.

Thanks in advance for every help attempt!


Solution

  • It for me means that I should downgrade the package libc6 to version 2.31-0ubuntu9.9,

    Downgrading libc6 is never a good idea, and is almost guaranteed to break your system.

    Instead you should update your version of libc6-i386 (the one you have is old, and depends on older libc6).