akiyosi / goneovim

A GUI frontend for neovim.
MIT License
2.39k stars 61 forks source link

error while loading shared libraries: libtiff.so.5: cannot open shared object file: No such file or directory #504

Closed JesseChavez closed 10 months ago

JesseChavez commented 11 months ago

Trying to upgrade my goneovim after 10 months or so.

I'm getting the following error

./goneovim-v0.6.5-linux/goneovim
./goneovim-v0.6.5-linux/goneovim: error while loading shared libraries: libtiff.so.5: cannot open shared object file: No such file or directory

My OS is Ubuntu 23.04, the old goneovim still works in Ubuntu 23.04

Thanks

JesseChavez commented 11 months ago

I found the below post, it seems Ubuntu needs libtiff.so.6 but I guess previously goneovim did not depend on libtiff.so.6 or libtiff.so.5 since my old goneovim still works.

https://askubuntu.com/questions/1467216/libtiff-so-5-issue-with-emacs-after-upgrade-to-ubuntu-23-04

akiyosi commented 11 months ago

@JesseChavez
Hi :) Thanks for this issue reporting. Does v0.6.7 also cause this problem?

JesseChavez commented 11 months ago

Hi @akiyosi

Same issue:

$ ./goneovim-v0.6.7-linux/goneovim --version
./goneovim-v0.6.7-linux/goneovim: error while loading shared libraries: libtiff.so.5: cannot open shared object file: No such file or directory

This is the old version that works in my environment:

$ ./own/goneovim-v0.6.3-linux/goneovim --version
v0.6.3

This is my environment:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 23.04
Release:    23.04
Codename:   lunar
$ uname -a
Linux akuma 6.2.0-34-generic #34-Ubuntu SMP PREEMPT_DYNAMIC Mon Sep  4 13:06:55 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
akiyosi commented 11 months ago

@JesseChavez The build procedure for release binaries has been changed for v0.6.3 and v0.6.5 and later. It is not easy to revisit this changed procedure and remove the dependency on libtiff. Based on the content of the error regarding libtiff, I believe that the error can be avoided by installing the necessary libraries.

The error message error while loading shared libraries: libtiff.so.5: cannot open shared object file: No such file or directory indicates that the program is attempting to load a shared library named libtiff.so.5, but this library does not exist on the system. Here are several ways to address this issue:

  1. Library Installation:

    • Installing the required library on the system can resolve the error. On Ubuntu, you can install the libtiff5 package using the following command:
      sudo apt-get install libtiff5
  2. Creating a Symbolic Link:

    • If a different version of libtiff.so.5 is already installed on your system, you can create a symbolic link to help the program find the library:
      sudo ln -s /usr/lib/x86_64-linux-gnu/libtiff.so.<installed-version> /usr/lib/x86_64-linux-gnu/libtiff.so.5
  3. Setting the LD_LIBRARY_PATH:

    • You can set the LD_LIBRARY_PATH environment variable to explicitly specify the path where the program should look for libtiff.so.5:
      export LD_LIBRARY_PATH=/path/to/directory/with/libtiff.so.5:$LD_LIBRARY_PATH
akiyosi commented 11 months ago

@JesseChavez Is there any progress on this? If you feel differently about my answers above, I would like to discuss them with you.

indivisible commented 10 months ago

libtiff5 is gone since ubuntu lunar (23.04). Debian bookworm also dropped it, so the releases are broken on that too.

akiyosi commented 10 months ago

@indivisible Thanks for comment! I think I can generate a fixed binary by building on a newer ver of Ubuntu. I will work on this issue and create a trial binary.

akiyosi commented 10 months ago

@indivisible By the way, Are the following procedures unacceptable to you?

cd /usr/lib/x86_64-linux-gnu
sudo ln -s libtiff.so.6 libtiff.so.5

ref: https://askubuntu.com/questions/1467216/libtiff-so-5-issue-with-emacs-after-upgrade-to-ubuntu-23-04

indivisible commented 10 months ago

Thanks, it does start up with that hack, though I'd say symlinking the system libtiff.so to the release's lib/ directory is cleaner

IMO a flatpak or appimage would result in a more robust cross-distro build (or also bundling libtiff with the builds)

akiyosi commented 10 months ago

Thanks for your opinion. We will consider offering it in flatpak or appimage! This issue is closed.