【发布时间】:2016-01-28 15:21:49
【问题描述】:
我是 linux 新手,我正在尝试在 Ubuntu 桌面上安装 gimp 的 webp 插件。我已经从 gimp 的下载站点下载了 tarball 并解压了它。我按照自述文件中的说明进行操作,但它不起作用。
它说我首先需要从谷歌安装 webp 库。可以在这里找到:
http://code.google.com/speed/webp/download.html
但我不知道如何安装它。这可能是微不足道的事情,但作为一个新手,我不知道下一步该做什么。
我还去了 Ubuntu 软件中心,在那里找到了相同的软件包并单击了安装按钮。这似乎有效,所以我认为它现在已安装。
自述文件告诉我发出以下命令:
export LIBS=-lwebp
gimptool-2.0 --install file-webp.c
这给了我以下结果:
gcc -pthread -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/harfbuzz -I/usr/include/gimp-2.0 -o /home/pascal/.gimp-2.8/plug-ins/file-webp file-webp.c -lgimpui-2.0 -lgimpwidgets-2.0 -lgimpmodule-2.0 -lgimp-2.0 -lgimpmath-2.0 -lgimpconfig-2.0 -lgimpcolor-2.0 -lgimpbase-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0 -lfreetype -lwebp
/usr/bin/ld: cannot find -lwebp
collect2: error: ld returned 1 exit status
我也尝试使用 -libwebp 而不是 -lwebp,但这给了我相同的错误消息。
更新
我也安装了 libwebp-dev 并尝试了相同的命令。它解决了错误,但现在给了我另一个错误:
gcc -pthread -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/harfbuzz -I/usr/include/gimp-2.0 -o /home/pascal/.gimp-2.8/plug-ins/file-webp file-webp.c -lgimpui-2.0 -lgimpwidgets-2.0 -lgimpmodule-2.0 -lgimp-2.0 -lgimpmath-2.0 -lgimpconfig-2.0 -lgimpcolor-2.0 -lgimpbase-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0 -lfreetype -lwebp
/tmp/cchf3eQS.o: In function `run':
file-webp.c:(.text+0x1b2): undefined reference to `read_webp'
file-webp.c:(.text+0x281): undefined reference to `export_dialog'
file-webp.c:(.text+0x2b5): undefined reference to `write_webp'
collect2: error: ld returned 1 exit status
【问题讨论】: