webkitgtk build(当我安装了 webp 库时找不到 WebP 库)

发布于 2025-01-09 04:17:27 字数 2232 浏览 1 评论 0原文

当我在 Ubuntu 20.04.3 LTS 上构建 webkitgtk-2.34.6 时,使用以下命令:(遵循官方文档)[https://trac.webkit.org/wiki/BuildingGtk]

cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja

“未找到 WebP 库”错误出现:

-- The CMake build type is: RelWithDebInfo
-- Could NOT find Ruby (missing: RUBY_INCLUDE_DIR RUBY_LIBRARY RUBY_CONFIG_INCLUDE_DIR) (found suitable version "2.7.0", minimum required is "1.9")
-- Enabling ccache: Couldn't find ccache program. Not enabling it.
-- Performing Test C_COMPILER_SUPPORTS_-fdiagnostics-color=always
-- Performing Test C_COMPILER_SUPPORTS_-fdiagnostics-color=always - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-fdiagnostics-color=always
-- Performing Test CXX_COMPILER_SUPPORTS_-fdiagnostics-color=always - Success
-- Found the following HarfBuzz libraries:
--  HarfBuzz (required): /usr/lib/x86_64-linux-gnu/libharfbuzz.so
--  ICU (required): /usr/lib/x86_64-linux-gnu/libharfbuzz-icu.so
-- Found the following ICU libraries:
--   data (required)
--   i18n (required)
--   uc (required)
-- The following WebP libraries were not found:
--  WebP (required)
--  demux (required)
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find WebP (missing: WebP_INCLUDE_DIR WebP_LIBRARY
  _WebP_REQUIRED_LIBS_FOUND)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  Source/cmake/FindWebP.cmake:133 (find_package_handle_standard_args)
  Source/cmake/WebKitFindPackage.cmake:105 (_find_package)
  Source/cmake/OptionsGTK.cmake:25 (find_package)
  Source/cmake/WebKitCommon.cmake:220 (include)
  CMakeLists.txt:20 (include)


-- Configuring incomplete, errors occurred!
See also "/home/crz/SerialscreenWebkit/CMakeFiles/CMakeOutput.log".
See also "/home/crz/SerialscreenWebkit/CMakeFiles/CMakeError.log".

但是我已经使用以下命令安装了webp库

sudo apt-get install -y webp
Reading package lists... Done
Building dependency tree
Reading state information... Done
webp is already the newest version (0.6.1-2ubuntu0.20.04.1).
0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded.

when I build the webkitgtk-2.34.6 on Ubuntu 20.04.3 LTS, using the following command:(Follow the official documentation)[https://trac.webkit.org/wiki/BuildingGtk]

cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja

"WebP libraries were not found" error appear:

-- The CMake build type is: RelWithDebInfo
-- Could NOT find Ruby (missing: RUBY_INCLUDE_DIR RUBY_LIBRARY RUBY_CONFIG_INCLUDE_DIR) (found suitable version "2.7.0", minimum required is "1.9")
-- Enabling ccache: Couldn't find ccache program. Not enabling it.
-- Performing Test C_COMPILER_SUPPORTS_-fdiagnostics-color=always
-- Performing Test C_COMPILER_SUPPORTS_-fdiagnostics-color=always - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-fdiagnostics-color=always
-- Performing Test CXX_COMPILER_SUPPORTS_-fdiagnostics-color=always - Success
-- Found the following HarfBuzz libraries:
--  HarfBuzz (required): /usr/lib/x86_64-linux-gnu/libharfbuzz.so
--  ICU (required): /usr/lib/x86_64-linux-gnu/libharfbuzz-icu.so
-- Found the following ICU libraries:
--   data (required)
--   i18n (required)
--   uc (required)
-- The following WebP libraries were not found:
--  WebP (required)
--  demux (required)
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find WebP (missing: WebP_INCLUDE_DIR WebP_LIBRARY
  _WebP_REQUIRED_LIBS_FOUND)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  Source/cmake/FindWebP.cmake:133 (find_package_handle_standard_args)
  Source/cmake/WebKitFindPackage.cmake:105 (_find_package)
  Source/cmake/OptionsGTK.cmake:25 (find_package)
  Source/cmake/WebKitCommon.cmake:220 (include)
  CMakeLists.txt:20 (include)


-- Configuring incomplete, errors occurred!
See also "/home/crz/SerialscreenWebkit/CMakeFiles/CMakeOutput.log".
See also "/home/crz/SerialscreenWebkit/CMakeFiles/CMakeError.log".

but I have installed the webp library using the following command

sudo apt-get install -y webp
Reading package lists... Done
Building dependency tree
Reading state information... Done
webp is already the newest version (0.6.1-2ubuntu0.20.04.1).
0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

メ斷腸人バ 2025-01-16 04:17:27

使用这个命令

sudo apt install libwebp-dev

use this command

sudo apt install libwebp-dev
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文