nyxt icon indicating copy to clipboard operation
nyxt copied to clipboard

Linux AppImage 4.0.0-pre-release-13 Error opening shared object "libenchant-2.so"

Open ibbles opened this issue 4 months ago • 5 comments

Describe the bug

I cannot launch Nyxt 4.0.0-pre-release-13 on Ubuntu 24.04.

I downloaded and extracted Linux-Nyxt-x86_64.tar.gz and tried to run it but got

Unhandled SIMPLE-ERROR in thread #<SB-THREAD:THREAD tid=45527 "main thread" RUNNING
                                    {10030B8003}>:
  Error opening shared object "libenchant-2.so":
  libenchant-2.so: cannot open shared object file: No such file or directory.

Steps to reproduce the issue

Complete shell history:

~/Downloads
➤ ls
Linux-Nyxt-x86_64.tar.gz
➤ tar -xf Linux-Nyxt-x86_64.tar.gz 
➤ ls
Linux-Nyxt-x86_64.tar.gz  Nyxt-x86_64.AppImage*
~/Downloads
➤ ./Nyxt-x86_64.AppImage 
Unhandled SIMPLE-ERROR in thread #<SB-THREAD:THREAD tid=45527 "main thread" RUNNING
                                    {10030B8003}>:
  Error opening shared object "libenchant-2.so":
  libenchant-2.so: cannot open shared object file: No such file or directory.

Backtrace for: #<SB-THREAD:THREAD tid=45527 "main thread" RUNNING {10030B8003}>
0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<SIMPLE-ERROR "Error opening ~:[runtime~;shared object ~:*~S~]:
  ~A." {1003088193}> #<unused argument> :QUIT T)
1: (SB-DEBUG::RUN-HOOK *INVOKE-DEBUGGER-HOOK* #<SIMPLE-ERROR "Error opening ~:[runtime~;shared object ~:*~S~]:
  ~A." {1003088193}>)
2: (INVOKE-DEBUGGER #<SIMPLE-ERROR "Error opening ~:[runtime~;shared object ~:*~S~]:
  ~A." {1003088193}>)
3: (ERROR "Error opening ~:[runtime~;shared object ~:*~S~]:
  ~A." "libenchant-2.so" "libenchant-2.so: cannot open shared object file: No such file or directory")
4: (SB-SYS:DLOPEN-OR-LOSE #S(SB-ALIEN::SHARED-OBJECT :PATHNAME #P"libenchant-2.so" :NAMESTRING "libenchant-2.so" :HANDLE NIL :DONT-SAVE NIL))
5: (SB-ALIEN::TRY-REOPEN-SHARED-OBJECT #S(SB-ALIEN::SHARED-OBJECT :PATHNAME #P"libenchant-2.so" :NAMESTRING "libenchant-2.so" :HANDLE NIL :DONT-SAVE NIL))
6: (SB-SYS:REOPEN-SHARED-OBJECTS)
7: (SB-IMPL::FOREIGN-REINIT)
8: (SB-IMPL::REINIT T)
9: ((FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP))
10: ((FLET "WITHOUT-INTERRUPTS-BODY-3" :IN SB-IMPL::START-LISP))
11: (SB-IMPL::%START-LISP)

unhandled condition in --disable-debugger mode, quitting
WARNING: Already terminated, nothing to do.

Information

  • OS Name+Version: Ubuntu 24.04.2 LTS
  • Installation method (Flatpak, Guix, package manager, build from source): AppImage from GitHub > Releases.
  • Output of Nyxt command show-system-information:

The following is from Nyxt 3.12.0 installed with flatpak install flathub engineer.atlas.Nyxt, i.e. not the same as the 4.0.0 pre-release AppImage I'm trying to launch:

Nyxt version: 3.12.0
Renderer: GI-GTK
Operating system kernel: Linux 6.8.0-71-generic
Lisp implementation: SBCL 2.4.7 (Dynamic space size: 3221225472)
Features: (:NYXT-GI-GTK :NYXT-GTK :NYXT-GI-GTK :NYXT-GTK :NYXT-3.12 :NYXT-3 :NYXT-3.12.0 :CLIPBOARD-CONTENT-METHOD :SWANK :SLYNK :PLUMP-UTF-32 :PARENSCRIPT :NSYMBOLS :FSET-EXT-STRINGS :SBCL+SAFE-STANDARD-READTABLE :NAMED-READTABLES :FLATPAK :GLOBAL-VARS :CL-FAD :LPARALLEL :21BIT-CHARS :CUSTOM-HASH-TABLE-NATIVE :CL-PPCRE-UNICODE :CL-UNICODE :CL-JSON-DOUBLE-FLOAT-IS-SUBSUMED :CL-JSON-SINGLE-FLOAT-IS-SUBSUMED :CHUNGA :FLEXI-STREAMS :CL-PPCRE :WEBKIT2 :WEBKIT-2.46.5 :WEBKIT-2.46 :WEBKIT-2 :WEBKIT2-CORS-ALLOWLIST :WEBKIT2-PASTE-PLAINTEXT :WEBKIT2-TRACKING :WEBKIT2-MUTE :WEBKIT2-EMOJI :WEBKIT2-MEDIA :WEBKIT2-SANDBOXING :GTK-3-22 :GTK-3-20 :GTK-3-18 :GTK-3-16 :GTK-3-14 :GTK-3-12 :GTK-3-10 :GTK-3-8 :GTK-3-6 :GTK-3-4 :GTK :GDK-3-22 :GDK-3-20 :GDK-3-18 :GDK-3-16 :GDK-3-14 :GDK-3-12 :GDK-3-10 :GDK-3-8 :GDK-3-6 :GDK-3-4 :CAIRO-1-10 :CAIRO-1-12 :GDK-PIXBUF :CLOSER-MOP :GLIB-2-30 :GLIB-2-32 :GLIB-2-34 :GLIB-2-36 :GLIB-2-38 :GLIB-2-40 :GLIB-2-42 :GLIB-2-44 :GLIB-2-46 :GLIB-2-48 :GLIB-2-50 :GLIB-2-52 :GLIB-2-54 :GLIB-2-56 :GLIB-2-58 :GLIB :BORDEAUX-THREADS :LPARALLEL.WITH-CLTL2 :LPARALLEL.WITH-CAS :LPARALLEL.WITH-STEALING-SCHEDULER :SPLIT-SEQUENCE CFFI-FEATURES:FLAT-NAMESPACE CFFI-FEATURES:X86-64 CFFI-FEATURES:UNIX :CFFI CFFI-SYS::FLAT-NAMESPACE ALEXANDRIA::SEQUENCE-EMPTYP :FAST-IO-SV :FAST-IO :CL-JSON-CLOS :CL-JSON :SBCL-USES-SB-ROTATE-BYTE CHIPZ-SYSTEM:GRAY-STREAMS :THREAD-SUPPORT :ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :ARENA-ALLOCATOR :X86-64 :GENCGC :64-BIT :ANSI-CL :COMMON-LISP :ELF :IEEE-FLOATING-POINT :LINUX :LITTLE-ENDIAN :PACKAGE-LOCAL-NICKNAMES :SB-LDB :SB-PACKAGE-LOCKS :SB-THREAD :SB-UNICODE :SBCL :UNIX)

ASDF version: 3.3.1
ASDF registries: (NYXT-SOURCE-REGISTRY ENVIRONMENT-SOURCE-REGISTRY)
Critical dependencies: (/run/build/nyxt/_build/cl-cffi-gtk/gtk/cl-cffi-gtk.asd /run/build/nyxt/_build/cl-gobject-introspection/cl-gobject-introspection.asd /run/build/nyxt/_build/cl-webkit/webkit2/cl-webkit2.asd)

ibbles avatar Aug 10 '25 17:08 ibbles

Just in case you chose the present tense in ›I cannot launch N.‹ indeed meaning ›still cannot launch‹:

apt install enchant-2 on your Ubuntu should solve the dependency so that you should be able to run Nyxt-x86_64.AppImage (unless there are no other dependencies missing).

cvogl avatar Aug 11 '25 15:08 cvogl

I thought AppImages are self-contained packages? Guess I was wrong.

I already have the enchant-2 package installed, but I noticed that the file name differ.

  • libenchant-2.so: What Nyxt is looking for.
  • libenchant-2.so.2: What my system actually has.

As a work-around I created a symlink named libenchant-2.so next to Nyxt-x86_64.AppImage pointing to /usr/lib/x86_64-linux-gnu/libenchant-2.so.2 and that let the start-up process get a bit further. Now I'm getting something about SUID sandbox helper binary not being configured correctly, which is a separate problem.

Some shell output, in case my description is unclear.

# Do I have enchant-2 installed?
➤ dpkg --get-selections | grep enchant
enchant-2					install
libenchant-2-2:amd64				install
# Yes I have.

# Does Nyxt work today?
➤ ./Nyxt-x86_64.AppImage
Unhandled SIMPLE-ERROR in thread #<SB-THREAD:THREAD tid=30485 "main thread" RUNNING
                                    {10030B8003}>:
  Error opening shared object "libenchant-2.so":
  libenchant-2.so: cannot open shared object file: No such file or directory.
# No, still same error.

# Try to install enchant-2 again.
➤ sudo apt install enchant-2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
enchant-2 is already the newest version (2.3.3-2build2).
enchant-2 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 35 not upgraded.
# That did nothing.

# Where is the enchant-2 library?
➤ locate libenchant-2.so
# snap stuff I don't think we care about.
# flatpack stuff I don't think we care about.
/usr/lib/x86_64-linux-gnu/libenchant-2.so.2
/usr/lib/x86_64-linux-gnu/libenchant-2.so.2.3.3
# In the main system libraries location. So it should find it.

# Try loading it explicitly. Perhaps Nyxt won't try to search for it then.
➤ env LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libenchant-2.so.2 ./Nyxt-x86_64.AppImage 
Unhandled SIMPLE-ERROR in thread #<SB-THREAD:THREAD tid=30767 "main thread" RUNNING
                                    {10030B8003}>:
  Error opening shared object "libenchant-2.so":
  libenchant-2.so: cannot open shared object file: No such file or directory.
# Didn't help.

# Try pointing out the directory path explicitly. Perhaps AppImages have unexpected search paths.
➤ env LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/ ./Nyxt-x86_64.AppImage
Unhandled SIMPLE-ERROR in thread #<SB-THREAD:THREAD tid=30857 "main thread" RUNNING
                                    {10030B8003}>:
  Error opening shared object "libenchant-2.so":
  libenchant-2.so: cannot open shared object file: No such file or directory.
# Didn't help.

# Hmmm. The filenames aren't the same. The system library as an extra `.2` at the end.

# Create a symlink with the name it wants next to the Nyxt binary and hope it searches in $ORIGIN.
➤ ln -s /usr/lib/x86_64-linux-gnu/libenchant-2.so.2 libenchant-2.so
➤ ./Nyxt-x86_64.AppImage
Nyxt version 4
<INFO> [18:23:02] Source location: #P""
<INFO> [18:23:02] Listening to socket: #P"/run/user/1000/nyxt/nyxt.socket"
[31006:0811/182303.074016:FATAL:sandbox/linux/suid/client/setuid_sandbox_host.cc:163] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I\'m aborting now. You need to make sure that /tmp/.mount_cl-eleDE433m/chrome-sandbox is owned by root and has mode 4755.
# One step forward, that\'s a new error.

This seems like a platform problem to me, I guess some distributions call the file libenchant-2.so while others (my Ubuntu) calls it libenchant-2.so.2. Not sure what to do about that.

Full locate output, with expanded symlinks, in case that is any help:

➤ ll (locate libenchant-2.so)
lrwxrwxrwx 1 root root  21 nov  5  2020 /snap/gnome-3-38-2004/143/usr/lib/x86_64-linux-gnu/libenchant-2.so -> libenchant-2.so.2.2.8
lrwxrwxrwx 1 root root  21 nov  5  2020 /snap/gnome-3-38-2004/143/usr/lib/x86_64-linux-gnu/libenchant-2.so.2 -> libenchant-2.so.2.2.8
-rw-r--r-- 1 root root 51K nov  5  2020 /snap/gnome-3-38-2004/143/usr/lib/x86_64-linux-gnu/libenchant-2.so.2.2.8
lrwxrwxrwx 1 root root  21 feb  7  2022 /snap/gnome-42-2204/176/usr/lib/x86_64-linux-gnu/libenchant-2.so -> libenchant-2.so.2.3.2
lrwxrwxrwx 1 root root  21 feb  7  2022 /snap/gnome-42-2204/176/usr/lib/x86_64-linux-gnu/libenchant-2.so.2 -> libenchant-2.so.2.3.2
-rw-r--r-- 1 root root 55K mar 26  2024 /snap/gnome-42-2204/176/usr/lib/x86_64-linux-gnu/libenchant-2.so.2.3.2
lrwxrwxrwx 1 root root  21 feb  7  2022 /snap/gnome-42-2204/202/usr/lib/x86_64-linux-gnu/libenchant-2.so -> libenchant-2.so.2.3.2
lrwxrwxrwx 1 root root  21 feb  7  2022 /snap/gnome-42-2204/202/usr/lib/x86_64-linux-gnu/libenchant-2.so.2 -> libenchant-2.so.2.3.2
-rw-r--r-- 1 root root 55K dec 13  2024 /snap/gnome-42-2204/202/usr/lib/x86_64-linux-gnu/libenchant-2.so.2.3.2
lrwxrwxrwx 1 root root  21 mar 31  2024 /snap/gnome-46-2404/117/usr/lib/x86_64-linux-gnu/libenchant-2.so -> libenchant-2.so.2.3.3
lrwxrwxrwx 1 root root  21 mar 31  2024 /snap/gnome-46-2404/117/usr/lib/x86_64-linux-gnu/libenchant-2.so.2 -> libenchant-2.so.2.3.3
-rw-r--r-- 1 root root 51K jun 21 15:40 /snap/gnome-46-2404/117/usr/lib/x86_64-linux-gnu/libenchant-2.so.2.3.3
lrwxrwxrwx 1 root root  21 mar 31  2024 /snap/gnome-46-2404/90/usr/lib/x86_64-linux-gnu/libenchant-2.so -> libenchant-2.so.2.3.3
lrwxrwxrwx 1 root root  21 mar 31  2024 /snap/gnome-46-2404/90/usr/lib/x86_64-linux-gnu/libenchant-2.so.2 -> libenchant-2.so.2.3.3
-rw-r--r-- 1 root root 51K apr  7 22:21 /snap/gnome-46-2404/90/usr/lib/x86_64-linux-gnu/libenchant-2.so.2.3.3
lrwxrwxrwx 1 root root  21 mar 31  2024 /usr/lib/x86_64-linux-gnu/libenchant-2.so.2 -> libenchant-2.so.2.3.3
-rw-r--r-- 1 root root 51K mar 31  2024 /usr/lib/x86_64-linux-gnu/libenchant-2.so.2.3.3
lrwxrwxrwx 1 root root  21 jul  3 22:01 /var/lib/flatpak/runtime/org.gnome.Platform/x86_64/46/c216ec47b13d278767d170b1ab21c8a483cccb8a4dfa803676b33791b8a955a7/files/lib/x86_64-linux-gnu/libenchant-2.so.2 -> libenchant-2.so.2.6.7*
-rwxr-xr-x 2 root root 44K jan  1  1970 /var/lib/flatpak/runtime/org.gnome.Platform/x86_64/46/c216ec47b13d278767d170b1ab21c8a483cccb8a4dfa803676b33791b8a955a7/files/lib/x86_64-linux-gnu/libenchant-2.so.2.6.7*

ibbles avatar Aug 11 '25 16:08 ibbles

A follow-up on the sandbox error. Following, and slightly adapting, https://askubuntu.com/questions/1512287/obsidian-appimage-the-suid-sandbox-helper-binary-was-found-but-is-not-configu I created /etc/apparmor.d/nyxt with the following content:

# This profile allows everything and only exists to give the
# application a name instead of having the label "unconfined"

abi <abi/4.0>,
include <tunables/global>

profile nyxt /media/s2000/bin/Nyxt/Nyxt-x86_64.AppImage flags=(unconfined) {
  userns,

  # Site-specific additions and overrides. See local/README for details.
  include if exists <local/nyxt>
}

ran sudo systemctl reload apparmor.service and now I can run Nyxt 4 (Electron) as long as the file is in that special place and the libenchang-2.so symlink is right next to it. Not the most user-friendly setup process, and required sudo privileges, but I got it working eventually.

I have no further questions at this time so if this is deemed a good enough state of affairs then you can close this.

ibbles avatar Aug 11 '25 17:08 ibbles

Got this same error on Fedora, to resolve needed the following enchant dependency:

$ sudo dnf install enchant2-devel

In case anyone is interested.

logoraz avatar Dec 05 '25 21:12 logoraz

App images are self contained, but the goal is not bring in the whole world whenever possible. It seems we'll have to include libenchant for those who do not have it!

jmercouris avatar Dec 07 '25 07:12 jmercouris