Score:1

libtiff.so.5 issue with emacs after upgrade to Ubuntu 23.04

cz flag

When I recently upgraded to Ubuntu 23.04 from 22.10, I was unable to start Emacs (I am using Doom Emacs). In the terminal I get this message:

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

Note that under 22.10, I had built and installed Emacs 28.2. I have tried simply installing Emacs 28.2 which now is packaged for Ubuntu 23.04 but that does not work. I also tried creating a symlink between libtiff.so.5 and libtiff.so.6 as suggested by someone (can't find the link now), but again that did not change anything.

Do I need to rebuild and reinstall Emacs under 23.04, or should I completely remove my existing Emacs and Doom and reinstall using apt-get? Or is there something else I should be doing?

I am very much a newbe playing with things I don't really understand, so your help would be appreciated.

Anthony Kelly avatar
ng flag
You could try creating a symlink named libtiff.so.5 to whatever version is deployed in 22.04. In /usr/lib/x86_64-linux-gnu run something like: sudo ln -s libtiff.so.5.X.Y libtiff.so.5.
David avatar
cz flag
This works! Many thanks.
Anthony Kelly avatar
ng flag
Great! Maybe you can upvote the answer below for me :-)
Score:3
ng flag

I think Ubuntu 23.04 ships with libtiff.so.6; double-check that this is correct by looking in /usr/lib/x86_64-linux-gnu.

If the particular APIs that Emacs uses in libtiff haven't changed then you can fool Emacs by creating a symlink named libtiff.so.5 to libtiff.so.6.

In /usr/lib/x86_64-linux-gnu run something like sudo ln -s libtiff.so.6 libtiff.so.5.

David avatar
cz flag
I would definitely upvote this but apparently I don't have the reputation to do so. It looks like 23.04 ships with libtiff.so.6.0.0 and included symlinks point from libtiff.so and libtiff.so.6 to libtiff.so.6.0.0. Thanks again.
Anthony Kelly avatar
ng flag
Sorry, I meant to accept the answer. You can do that as you asked the question.
Score:0
in flag

Note: This solution does not apply to Doom Emacs and should probably be under a much more general question, but this is what solved my emacs upgrade error which complained about libtiff.so.5:

Wow! I performed an upgrade against emacs-gtk and met this error. Applying the accepted solution, proved that this error was only the tip of the ice-burgh. So I did this:

  1. Remove emacs via apt-get purge emacs*
  2. Remove any executable that appears in emacs code completion.
  3. Download, compile, and install emacs from source.

It is unusual that I download any emacs Debian package, but I performed a hurried install last time around when I installed emacs-gtk.

Long ago, I created a routine to compile emacs because it enables emacs automated help to display corresponding source code even if C.

zDir=$(dirname -- "${BASH_SOURCE[0]}")
zSource="$zDir/emacs"
if [[ -d "$zSource" ]]; then
    cd "$zSource"
    git pull --rebase # should I use --rebase?
else
    cd "$zDir" || exit 1
    git clone https://salsa.debian.org/rlb/deb-emacs.git "$zSource"
    cd "$zSource" || exit 1
fi

# emacs is deeply connected to x
sudo apt-get -y build-dep emacs-gtk

./autogen.sh # create configure+x according to configure.ac
./configure # create Makefile according to Makefile.in
# existing files are not removed by git pull pull --rebase
# make clean does not remove old .elc files which will case make to fail
# find "$zSource" -name '*.elc' -exec sudo rm '{}' + 
make
sudo make install # did this instead of make-dist and it worked

cd -

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.