Hello- I'm not sure whether I should make this post in the main Arch Linux forums or in AUR for dvipng,
but I will try here first.
I have used dvipng without any problems for over six months, but yesterday I got the following error:
dvipng: error while loading shared libraries: libgd.so.2: cannot open shared object file: No such file or directory
I know I have libgd installed on my system. sudo pacman -Ql gd returns:
... gd /usr/lib/libgd.so gd /usr/lib/libgd.so.3 gd /usr/lib/libgd.so.3.0.0
but no libgd.so.2
I tried creating a symlink for libgd.so.2 that points to libgd.so.3 but this results in the following:
This is dvipng 1.14 Copyright 2002-2010 Jan-Ake Larsson tmp.dvi: No such file or directory
Has anyone else had similar issues with dvipng? Is this related to the recent texlive upgrade in Arch?
Last edited by gojun077 (2013-08-23 04:30:59)
I rebuilt dvipng from AUR with makepkg -f and reinstalled the package with sudo pacman -U <pkg name>.
I'm not sure whether this is an issue for the AUR package maintainer of dvipng or just 'luser error' on my part.
The package texlive-bin from extra also contains a dvipng binary, which works fine for me.
So you don't actually have to install anything from AUR.
I just tried out the dvipng package from AUR. It builds against libgd.so.3, and the resulting executable runs just fine. (Although the package installs everything in /usr/local which is bad form and should be fixed.).
Maybe in your case the symlink for libgd.so.2 that you created earlier (which is usually a bad idea btw) messes up the compilation? Remove it, make sure your system is completely up-to-date (`pacman -Syu`), and then try building the AUR package again.
I actually followed you here from the mnemosyne-proj-devel mailing list (which I watch occasionally because I maintain the AUR package for Mnemosyne), and I just realized that your problem is probably with latex, not dvipng.
Mnemosyne first calls the latex executable to create a file called tmp.dvi from a Latex source snippet, and then calls dvipng to further convert that file to png. If dvipng says "No such file or directory", it means latex failed to create it.
If you are using the TexLive latex distribution (packages texlive-bin + texlive-core from extra), then I can also guess the reason why: A package upgrade last month broke it in a way that requires manual intervention to fix - there was an archlinux.org news item about this with instructions how to fix it (merge .pacnew files, then call fmtutil-sys --all).
General tips for the future:
Always make sure you merge any .pacnew files after doing a package upgrade with pacman.
Subscribe to the Arch Linux news - either using the RSS feed found on the archlinux.org homepage, or using the arch-announce mailing list. It only has a few news items each year, but those it does have tend to be important for Arch Linux users.
When a program that you installed using an AUR package stops working, the best place to get answers is usually the corresponding AUR page (e.g. here for Mnemosyne). Of course, if you get no response there, this forum is the next place to try.
Last edited by sas (2013-08-22 13:45:55)
Thank you, sas!
I learned several new things from your post --
1) texlive-bin contains dvipng (so I don't need to use dvipng in AUR)
2) I didn't properly merge the pacnew files for texlive
I will also make sure to subscribe to the Archlinux RSS feed so I don't miss important news (like texlive upgrade requiring user intervention) in the future!