Error while loading shared libraries: libboost_context.so.1.69.0: cannot open shared object file: No such file or directory

Copy-pasted from https://forum.manjaro.org/t/error-while-loading-shared-libraries-libboost-context-so-1-69-0-cannot-open-shared-object-file-no-such-file-or-directory/115811:

error while loading shared libraries: libboost_context.so.1.69.0: cannot open shared object file: No such file or directory

My system is up-to-date and otherwise is working OK so far, after this topic:

https://forum.manjaro.org/t/cant-open-system-settings/115808

 17:19:14  ✘  jr@fm  ~  ⬡ v8.16.0  3m40s 
$ inxi -Fxxx
System:    Host: fm Kernel: 5.4.5-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.2.0 Desktop: KDE Plasma 5.17.80 tk: Qt 5.13.2 
           wm: kwin_x11 dm: SDDM Distro: Manjaro Linux 
Machine:   Type: Desktop Mobo: ASUSTeK model: TUF B450M-PLUS GAMING v: Rev X.0x serial: <root required> 
           UEFI: American Megatrends v: 1002 date: 03/07/2019 
CPU:       Topology: 8-Core model: AMD Ryzen 7 2700X bits: 64 type: MT MCP arch: Zen+ rev: 2 L2 cache: 4096 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 118227 
           Speed: 4321 MHz min/max: 2200/3700 MHz boost: enabled Core speeds (MHz): 1: 4324 2: 2013 3: 2165 4: 2066 5: 1989 
           6: 1994 7: 2036 8: 1991 9: 2008 10: 1932 11: 1817 12: 1869 13: 1834 14: 2159 15: 4331 16: 2169 
Graphics:  Device-1: NVIDIA TU104 [GeForce RTX 2080] vendor: ASUSTeK driver: nvidia v: 430.64 bus ID: 07:00.0 
           chip ID: 10de:1e82 
           Display: x11 server: X.Org 1.20.6 driver: nvidia compositor: kwin_x11 tty: N/A 
           OpenGL: renderer: GeForce RTX 2080/PCIe/SSE2 v: 4.6.0 NVIDIA 430.64 direct render: Yes 
Audio:     Device-1: NVIDIA vendor: ASUSTeK driver: snd_hda_intel v: kernel bus ID: 07:00.1 chip ID: 10de:10f8 
           Device-2: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel 
           bus ID: 09:00.3 chip ID: 1022:1457 
           Sound Server: ALSA v: k5.4.5-1-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK driver: r8168 v: 8.047.05-NAPI 
           port: f000 bus ID: 05:00.0 chip ID: 10ec:8168 
           IF: enp5s0 state: up speed: 100 Mbps duplex: half mac: 40:b0:76:5c:8c:4c 
Drives:    Local Storage: total: 465.76 GiB used: 48.76 GiB (10.5%) 
           ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO Plus 500GB size: 465.76 GiB speed: 31.6 Gb/s lanes: 4 
           serial: S4EVNG0M116780W rev: 1B2QEXM7 scheme: GPT 
Partition: ID-1: / size: 389.04 GiB used: 48.76 GiB (12.5%) fs: ext4 dev: /dev/nvme0n1p2 
           ID-2: swap-1 size: 69.20 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/nvme0n1p3 
Sensors:   System Temperatures: cpu: 49.0 C mobo: N/A gpu: nvidia temp: 38 C 
           Fan Speeds (RPM): N/A gpu: nvidia fan: 22% 
Info:      Processes: 311 Uptime: 20m Memory: 62.81 GiB used: 2.60 GiB (4.1%) Init: systemd v: 242 Compilers: gcc: 9.2.0 
           Shell: zsh v: 5.7.1 running in: konsole inxi: 3.0.37 

 17:19:20  jr@fm  ~  ⬡ v8.16.0 

More context for the issue is here (comment), and also copy-pasted below.

https://github.com/holochain/holochain-rust/issues/1789#issuecomment-567792920

It’s with nix.

I had installed it via curl https://nixos.org/nix/install | sh, and got the error then, and also after uninstalling with rm -rf /nix and reinstalling with yay -a nix archlinux-nix; sudo archlinux-nix bootstrap

 16:01:01  ✘  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ sudo archlinux-nix bootstrap 


[sudo] password for jr: 
Installing sandbox binaries from NixOS-19.09 ...
nix-build: error while loading shared libraries: libboost_context.so.1.69.0: cannot open shared object file: No such file or directory

I found this:

I have boost-libs installed already, running sudo ldconfig didn’t help.

 16:25:05  ✘  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭  2m15s 
$ nix-shell
nix-shell: error while loading shared libraries: libboost_context.so.1.69.0: cannot open shared object file: No such file or directory
 17:19:20  jr@fm  ~  ⬡ v8.16.0 
$ nix-env
nix-env: error while loading shared libraries: libboost_context.so.1.69.0: cannot open shared object file: No such file or directory

 17:24:56  ✘  jr@fm  ~  ⬡ v8.16.0 
$ nix-env --version
nix-env: error while loading shared libraries: libboost_context.so.1.69.0: cannot open shared object file: No such file or directory
 17:27:21  jr@fm  ~  ⬡ v8.16.0  21s 
$ echo $NIX_PATH
nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixpkgs:/nix/var/nix/profiles/per-user/root/channels:/home/jr/.nix-defexpr/channels

Could you please clarify what command exactly are you trying to run which fails with this error?

As shown above, there are multiple commands that fail with this error: nix-shell, nix-env. In my context, I want to run nix-shell https://holochain.love, but that also produces the same error as just running nix-shell.

This means that the libboost169.so isn’t linked probably. you will want to do ldd /nix/store/....libboost169.so to see which dependency is missing.

also, you may want to follow the direction to install nix from here: Download Nix / NixOS | Nix & NixOS im not sure about the bootstrap arch package

 06:03:46  jr@fm  ~  ⬡ v8.16.0 
$ alias nh
nh='nix-shell https://holochain.love'

 06:19:31  jr@fm  ~  ⬡ v8.16.0 
$ nh
nix-shell: error while loading shared libraries: libboost_context.so.1.69.0: cannot open shared object file: No such file or directory

 06:19:32  ✘  jr@fm  ~  ⬡ v8.16.0 

As mentioned I got the same error from installing from curl https://nixos.org/nix/install | sh before uninstalling that and reinstalling from the package manager.

I’m just trying to find out exactly where libboost_context.so.1.69.0 is so that I can enter the ... part of ldd /nix/store/....libboost169.so

Just in case you literally meant ldd /nix/store/....libboost169.so

 06:19:32  ✘  jr@fm  ~  ⬡ v8.16.0 
$ ldd /nix/store/....libboost169.so
ldd: /nix/store/....libboost169.so: No such file or directory

I don’t actually have a store directory under /nix/. Hmm. All I have is /nix/var/nix/profiles/arch-system which is empty. Before switching back to trying to install from curl I tried installing manually as per Nix - ArchWiki but got this on the first command:

 06:27:34  ✘  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ sudo chown -R $USER. /nix/var/nix/{gcroots,profiles}
[sudo] password for jr: 
Sorry, try again.
[sudo] password for jr: 
chown: cannot access '/nix/var/nix/gcroots': No such file or directory

Maybe gcroots is specific to Archlinux and not Manjaro. So continuing:

 06:34:36  jr@fm  ~  ⬡ v8.16.0 
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable
nix-channel: error while loading shared libraries: libboost_context.so.1.69.0: cannot open shared object file: No such file or directory

 06:34:46  ✘  jr@fm  ~  ⬡ v8.16.0 
$ nix-channel --update
nix-channel: error while loading shared libraries: libboost_context.so.1.69.0: cannot open shared object file: No such file or directory

 06:34:50  ✘  jr@fm  ~  ⬡ v8.16.0 
$ nix-env -u
nix-env: error while loading shared libraries: libboost_context.so.1.69.0: cannot open shared object file: No such file or directory

 06:34:54  ✘  jr@fm  ~  ⬡ v8.16.0 
$ sudo nix-channel --update
[sudo] password for jr: 
nix-channel: error while loading shared libraries: libboost_context.so.1.69.0: cannot open shared object file: No such file or directory

 06:35:02  ✘  jr@fm  ~  ⬡ v8.16.0 
$ 

I’ll try uninstalling again and reinstalling from curl. Failing that I will try installing a fresh Manjaro, and then another distro, Nix should work better.

Strange, I uninstalled and reinstalled with curl https://nixos.org/nix/install | sh and now it works albeit two warnings:

 06:35:02  ✘  jr@fm  ~  ⬡ v8.16.0 
$ sudo rm -rf /nix

 06:36:47  jr@fm  ~  ⬡ v8.16.0 
$ curl https://nixos.org/nix/install | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2399  100  2399    0     0   2004      0  0:00:01  0:00:01 --:--:--  2004
downloading Nix 2.3.1 binary tarball for x86_64-linux from 'https://nixos.org/releases/nix/nix-2.3.1/nix-2.3.1-x86_64-linux.tar.xz' to '/tmp/nix-binary-tarball-unpack.kZhMlIeOW0'...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15.2M  100 15.2M    0     0  1862k      0  0:00:08  0:00:08 --:--:-- 2552k
Note: a multi-user installation is possible. See https://nixos.org/nix/manual/#sect-multi-user-installation
performing a single-user installation of Nix...
directory /nix does not exist; creating it by running 'mkdir -m 0755 /nix && chown jr /nix' using sudo
copying Nix to /nix/store................................
installing 'nix-2.3.1'
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
building '/nix/store/cb6ss4jv8baxkq2pi6fnviqp9zyna73l-user-environment.drv'...
created 6 symlinks in user environment
unpacking channels...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
created 1 symlinks in user environment

Installation finished!  To ensure that the necessary environment
variables are set, either log in again, or type

  . /home/jr/.nix-profile/etc/profile.d/nix.sh

in your shell.

 06:37:28  jr@fm  ~  ⬡ v8.16.0  18s 
$ . /home/jr/.nix-profile/etc/profile.d/nix.sh
 06:37:58  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ nh
unpacking 'https://holochain.love'...
unpacking 'https://github.com/NixOS/nixpkgs/archive/821c7ed030bca86c8217e6d20df1f01c6474adf4.tar.gz'...
unpacking 'https://github.com/mozilla/nixpkgs-mozilla/tarball/200cf0640fd8fdff0e1a342db98c9e31e6f13cd7'...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixpkgs' does not exist, ignoring
these derivations will be built:
  /nix/store/0g0yrlygc5fvxhb9ya8sv2v6djnvvv7s-hn-dist-audit.drv
#snip

I tried to fix as per a suggestion here but still got the warnings:

 06:37:51  jr@fm  ~  ⬡ v8.16.0 
$ export NIX_PATH=nixpkgs=nixpkgs=channel:nixos-19.03

 06:41:34  jr@fm  ~  ⬡ v8.16.0 
$ nix-channel --update
unpacking channels...
 06:41:58  ✘  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭  3m59s 
$ nh
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixpkgs' does not exist, ignoring
these derivations will be built:
  /nix/store/0g0yrlygc5fvxhb9ya8sv2v6djnvvv7s-hn-dist-audit.drv
#snip

I tried these from Nix - ArchWiki

 06:52:32  jr@fm  ~  ⬡ v8.16.0 
$ sudo chown -R $USER. /nix/var/nix/{gcroots,profiles}
[sudo] password for jr: 

 06:52:40  jr@fm  ~  ⬡ v8.16.0 
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable

 06:52:48  jr@fm  ~  ⬡ v8.16.0 
$ nix-channel --update
unpacking channels...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring

 06:52:55  jr@fm  ~  ⬡ v8.16.0 
$ nix-env -u
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring

 06:53:05  jr@fm  ~  ⬡ v8.16.0  6s 
$ sudo nix-channel --update
warning: the group 'nixbld' specified in 'build-users-group' does not exist
unpacking channels...
warning: the group 'nixbld' specified in 'build-users-group' does not exist
error: the group 'nixbld' specified in 'build-users-group' does not exist
error: program '/nix/store/6chjfy4j6hjwj5f8zcbbdg02i21x1qsi-nix-2.3.1/bin/nix-env' failed with exit code 1

 06:53:06  ✘  jr@fm  ~  ⬡ v8.16.0 
$ 

I’ll revisit warning: the group 'nixbld' specified in 'build-users-group' does not exist later.

Error while loading shared libraries: libboost_context.so.1.69.0: cannot open shared object file: No such file or directory

doesn’t occur when installing from curl, that seems to be due to installing nix from the AUR

nix seems to require boost1.69, which conflicts with boost (which is now 1.71). the dependency needs to be changed.
https://aur.archlinux.org/packages/nix/#comment-720747

we also had an outage with the nix database. May be contributing to your issue.

Nix doesn’t reference /usr/lib or any shared directory, it will only reference store paths. So it doesn’t really care what other versions of boosts are installed. The version/derivation is determined at evaluation time of the expression.

1 Like

I forgot to mention I tried this:

I changed the depends line of the PKGBUILD to this:

depends=('gc' 'libsodium' 'boost<=1.69' 'brotli' 'editline')

However,

 09:45:17  jr@fm  ~/nix-from-pkg-build  ⬡ v8.16.0 
$ makepkg        
==> ERROR: install file (nix.install) does not exist or is not a regular file.

I guess other changes may need to be made to the PKGBUILD, e.g. the sha256sums, but I don’t know.