【问题标题】:Installing the webp plugin for gimp on Ubuntu linux在 Ubuntu linux 上为 gimp 安装 webp 插件
【发布时间】: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

【问题讨论】:

    标签: linux ubuntu gimp webp


    【解决方案1】:

    WebP 插件 is included in Gimp 2.10 作为内置插件。

    On older scenarios:

    sudo add-apt-repository ppa:george-edison55/webp
    sudo apt update
    sudo apt install gimp-webp
    

    另外,in Ubuntu(自 16.04 起):

    sudo apt install webp
    

    将为您提供这些命令:

    • dwebp:将WebP文件解压成图片文件
    • cwebp:将图片文件压缩成WebP文件
    • webpmux:从非动画 WebP 图像创建动画 WebP 文件,从动画 WebP 图像中提取帧,并管理 XMP/EXIF 元数据和 ICC 配置文件。
    • gif2webp:将 GIF 图片转换为 WebP
    • vwebp:解压一个WebP文件并在窗口中显示

    【讨论】:

      【解决方案2】:

      我猜你安装了webp 包。而是安装 libwebp-dev 包。

      webp package 提供 CLI 二进制工具。 libwebp-dev package 提供了编译使用libwebp 的程序所需的开发库。

      编译器标志-lwebp 导致编译器查找名为libwebp.a libwebp-dev provides this file 的库。

      【讨论】:

      • 谢谢。这解决了问题。但是,安装仍然失败,现在出现另一个错误(请参阅问题的更新)。我理解您对解决方案的描述。我下载的 tarball 包含 CLI 二进制工具和库。文件 libwebp.a 在那里,但我猜编译器在路径中找不到它。我不知道如何解决。可能通过将文件移动到正确的位置,但我不知道在哪里。但是,使用该软件包的安装程序为我完成了一切。
      • 我下载了gimp-webp 代码。您可以通过运行make 来编译代码。但是,README 说明是错误的/陈旧的/旧的;使用 gimptool-2.0 --install file-webp.c 仅适用于 if the plug-in consists of only one file。此外,gimp-webp 包的日期为 2012 年。Nathan Osman here 正在进行积极的开发。按照here 的说明,我设法在 Ubuntu 14.04 / Gimp 2.8 上安装了他的webp 插件。
      • 谢谢。我按照说明进行操作,现在一切正常。
      猜你喜欢
      • 1970-01-01
      • 2011-06-02
      • 2021-12-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-21
      相关资源
      最近更新 更多