Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Chromebook]: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory #100

Closed
kittaakos opened this issue May 26, 2021 · 9 comments

Comments

@kittaakos
Copy link
Contributor

Bug Description:

Originally posted here:

I tried to run the Theia GUI again and...

max@penguin:~$ ./TheiaBlueprint.AppImage /tmp/.mount_TheiaBm5zT5r/theia-blueprint: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

A Google search shows several apps where ChromeOS Linux users are complaining about missing libnss3.so

Everything solved again after manually sudo apt install libnss3 Theia GUI and your script works OK

No sure what is the package that contains libnss3.so that "everybody seems to have installed on their systems"... In any case it would be a good idea to check for it and alert the user (or proactively include it on the package just in case)

Steps to Reproduce:

  1. Download the Electron-based application from here
  2. Start the app.

Does anyone know if this problem can be tackled at build time?

Additional Information

  • Operating System: Linux Developer environment on ChromeOS 90.0.4430.100. ChromeOS uses Debian Buster
  • Theia Version:
@marcdumais-work
Copy link
Contributor

I have no solution or suggestions ATM. On my Ubuntu system, I have this library in both 64 and 32 bit, and do not experience the issue with Blueprint:

$ dpkg -l | grep libnss3
ii  libnss3:amd64                              2:3.35-2ubuntu2.12                                            amd64        Network Security Service libraries
ii  libnss3:i386                               2:3.35-2ubuntu2.12                                            i386         Network Security Service libraries
ii  libnss3-dev:amd64                          2:3.35-2ubuntu2.12                                            amd64        Development files for the Network Security Service libraries
ii  libnss3-tools

@maxiauer
Copy link

Just to add some background:

  • Problem exist after doing "fresh install". On Chromebooks, you do not install the Debian OS. The ChromeOS is already distributed with a Debian 10 VM Image (actually, a container) ready to use.
  • Problem persist after checking for and installing updates
  • There is no further issue if you manually install libnss3 and then run TheiaBlueprint

For some reason, the Linux Image distributed with ChromeOS does not come with libnss3... But I am not sure what is the package that forces it to be installed on Ubuntu.

But in any case, shouldn't TheiaBlueprint check for the existence of this package and install it if it is not there??

Thanks

@marcdumais-work
Copy link
Contributor

But I am not sure what is the package that forces it to be installed on Ubuntu.

I played a bit with an ubuntu container, and I do not see libnss3 installed as a dependency, while setting-up the development environment to build a Theia application. The library got installed-along when I installed openjdk-11-jdk (see below*). It's possible it's also a dependency of other popular packages on Ubuntu.

shouldn't TheiaBlueprint check for the existence of this package and install it if it is not there??

I do not think so. It feels like the wrong level to fix this.

It looks electron builder already attempts to add libnss3 as a Debian package dependency, for that target. So, if you were to install the .deb package generated by the theia-electron example, it might work. You'll need to build it yourself, on a compatible architecture machine.

(*)
(search for libnss3)

$ docker run --rm -it ubuntu
root@1314369a30ff:/# dpkg -l | grep libnss3
root@1314369a30ff:/# apt-get update && apt-get  install -y openjdk-11-jdk
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:3 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [2152 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]         
Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]         
Get:6 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [423 kB]
Get:7 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [24.7 kB]
Get:8 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1413 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
Get:12 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1344 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [2584 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [452 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [2184 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [31.6 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [11.3 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [11.4 kB]
Fetched 22.7 MB in 6s (3841 kB/s)                             
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  at-spi2-core ca-certificates ca-certificates-java dbus fontconfig-config fonts-dejavu-core fonts-dejavu-extra
  java-common krb5-locales libapparmor1 libasound2 libasound2-data libatk-bridge2.0-0 libatk-wrapper-java
  libatk-wrapper-java-jni libatk1.0-0 libatk1.0-data libatspi2.0-0 libavahi-client3 libavahi-common-data
  libavahi-common3 libbsd0 libcups2 libdbus-1-3 libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2
  libdrm-radeon1 libdrm2 libedit2 libelf1 libexpat1 libfontconfig1 libfontenc1 libfreetype6 libgif7 libgl1
  libgl1-mesa-dri libglapi-mesa libglib2.0-0 libglib2.0-data libglvnd0 libglx-mesa0 libglx0 libgraphite2-3
  libgssapi-krb5-2 libharfbuzz0b libice-dev libice6 libicu60 libjpeg-turbo8 libjpeg8 libk5crypto3 libkeyutils1
  libkrb5-3 libkrb5support0 liblcms2-2 libllvm10 libnspr4 libnss3 libpciaccess0 libpcsclite1 libpng16-16
  libpthread-stubs0-dev libsensors4 libsm-dev libsm6 libsqlite3-0 libssl1.1 libx11-6 libx11-data libx11-dev
  libx11-doc libx11-xcb1 libxau-dev libxau6 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0
  libxcb-shape0 libxcb-sync1 libxcb1 libxcb1-dev libxcomposite1 libxdamage1 libxdmcp-dev libxdmcp6 libxext6
  libxfixes3 libxft2 libxi6 libxinerama1 libxml2 libxmu6 libxmuu1 libxpm4 libxrandr2 libxrender1 libxshmfence1
  libxt-dev libxt6 libxtst6 libxv1 libxxf86dga1 libxxf86vm1 multiarch-support openjdk-11-jdk-headless openjdk-11-jre
  openjdk-11-jre-headless openssl shared-mime-info ucf x11-common x11-utils x11proto-core-dev x11proto-dev
  xdg-user-dirs xorg-sgml-doctools xtrans-dev
Suggested packages:
  default-dbus-session-bus | dbus-session-bus default-jre libasound2-plugins alsa-utils cups-common krb5-doc
  krb5-user libice-doc liblcms2-utils pciutils pcscd lm-sensors libsm-doc libxcb-doc libxt-doc openjdk-11-demo
  openjdk-11-source visualvm libnss-mdns fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei
  | fonts-wqy-zenhei fonts-indic mesa-utils
The following NEW packages will be installed:
  at-spi2-core ca-certificates ca-certificates-java dbus fontconfig-config fonts-dejavu-core fonts-dejavu-extra
  java-common krb5-locales libapparmor1 libasound2 libasound2-data libatk-bridge2.0-0 libatk-wrapper-java
  libatk-wrapper-java-jni libatk1.0-0 libatk1.0-data libatspi2.0-0 libavahi-client3 libavahi-common-data
  libavahi-common3 libbsd0 libcups2 libdbus-1-3 libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2
  libdrm-radeon1 libdrm2 libedit2 libelf1 libexpat1 libfontconfig1 libfontenc1 libfreetype6 libgif7 libgl1
  libgl1-mesa-dri libglapi-mesa libglib2.0-0 libglib2.0-data libglvnd0 libglx-mesa0 libglx0 libgraphite2-3
  libgssapi-krb5-2 libharfbuzz0b libice-dev libice6 libicu60 libjpeg-turbo8 libjpeg8 libk5crypto3 libkeyutils1
  libkrb5-3 libkrb5support0 liblcms2-2 libllvm10 libnspr4 libnss3 libpciaccess0 libpcsclite1 libpng16-16
  libpthread-stubs0-dev libsensors4 libsm-dev libsm6 libsqlite3-0 libssl1.1 libx11-6 libx11-data libx11-dev
  libx11-doc libx11-xcb1 libxau-dev libxau6 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0
  libxcb-shape0 libxcb-sync1 libxcb1 libxcb1-dev libxcomposite1 libxdamage1 libxdmcp-dev libxdmcp6 libxext6
  libxfixes3 libxft2 libxi6 libxinerama1 libxml2 libxmu6 libxmuu1 libxpm4 libxrandr2 libxrender1 libxshmfence1
  libxt-dev libxt6 libxtst6 libxv1 libxxf86dga1 libxxf86vm1 multiarch-support openjdk-11-jdk openjdk-11-jdk-headless
  openjdk-11-jre openjdk-11-jre-headless openssl shared-mime-info ucf x11-common x11-utils x11proto-core-dev
  x11proto-dev xdg-user-dirs xorg-sgml-doctools xtrans-dev
0 upgraded, 123 newly installed, 0 to remove and 36 not upgraded.
Need to get 311 MB of archives.
After this operation, 829 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 multiarch-support amd64 2.27-3ubuntu1.4 [6944 B]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libxau6 amd64 1:1.0.8-1ubuntu1 [7556 B]

[...]

Adding debian:UCA_Global_G2_Root.pem
Adding debian:Hellenic_Academic_and_Research_Institutions_RootCA_2011.pem
done.
Setting up openjdk-11-jdk:amd64 (11.0.11+9-0ubuntu2~18.04) ...
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/jconsole to provide /usr/bin/jconsole (jconsole) in auto mode
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for ca-certificates (20210119~18.04.1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

done.
done.
root@1314369a30ff:/# dpkg -l | grep libnss3
ii  libnss3:amd64                 2:3.35-2ubuntu2.12        amd64        Network Security Service libraries
root@1314369a30ff:/# 

@marcdumais-work
Copy link
Contributor

It looks like this is how vscode makes sure libnss3 is present (mentioned as a Debian package dependency):
image

@kittaakos
Copy link
Contributor Author

It looks electron builder already attempts to add libnss3 as a Debian package dependency, for that target

Thank you so much for the help, @marcdumais-work.

if you were to install the .deb package generated by the theia-electron example

I can make those changes on a branch in the Theia Blueprint repo.

it might work.

@maxiauer, could you please help with the verification once I have those changes?

@marcdumais-work
Copy link
Contributor

I can make those changes on a branch in the Theia Blueprint repo.

I think it would be fine to build and eventually make Blueprint available in a Debian package. Is that what you have in mind @kittaakos?

@marcdumais-work
Copy link
Contributor

I think it would be fine to build and eventually make Blueprint available in a Debian package. Is that what you have in mind @kittaakos?

I see we already generate the .deb

@maxiauer
Copy link

Yeap, send it my way and I will do the verification testing

@kittaakos
Copy link
Contributor Author

Confirmed, shipping the app in deb target fixes the issue. Thank you for the help on this. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants