在编译最新稳定版本 webkitgtk-2.46.3 期间,我收到此错误:
rapy@raohy:~/下载/webkitgtk-2.46.3$ cmake --build builddir/
[ 92%] Built target WebCore_CopyPrivateHeaders
[ 92%] Built target WebKit-forwarding-headers
[ 92%] Generating ../../WebKitGTK/DerivedSources
/ModernMediaControlsGResourceBundle.c, ../../WebKitGTK/DerivedSources
/ModernMediaControlsGResourceBundle.c.deps
/usr/local/bin/xmllint: symbol lookup error: /usr/local/bin/xmllint: undefined symbol: xmlMemSize
/home/raphy/Downloads/webkitgtk-2.46.3/builddir/WebKitGTK/DerivedSources /ModernMediaControlsGResourceBundle.xml: Child process exited with code 127.
但是检测到合适的 xml2 库:
raphy@raohy:~/Downloads$ tar -xf webkitgtk-2.46.3.tar.xz
raphy@raohy:~/Downloads$ cd webkitgtk-2.46.3/
raphy@raohy:~/Downloads/webkitgtk-2.46.3$
raphy@raohy:~/Downloads/webkitgtk-2.46.3$ cmake -B builddir -DPORT=GTK
-DUSE_GSTREAMER_WEBRTC=TRUE -DENABLE_WEB_RTC=ON -DUSE_GTK4=OFF
-- The C compiler identification is GNU 12.3.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at Source/cmake/WebKitCommon.cmake:10 (message):
No CMAKE_BUILD_TYPE value specified, defaulting to RelWithDebInfo.
Call Stack (most recent call first):
CMakeLists.txt:16 (include)
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found suitable version "2.9.14", minimum required is "2.8.0") // <---------------------------------------------------------
libxml2
libxml2-dev
libxml2-utils
安装的已经是最新版本了:
raphy@raohy:~$ sudo apt-get install libxml2 libxml2-dev libxml2-utils
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libxml2 is already the newest version (2.9.14+dfsg-1.3ubuntu3).
libxml2-dev is already the newest version (2.9.14+dfsg-1.3ubuntu3).
libxml2-utils is already the newest version (2.9.14+dfsg-1.3ubuntu3).
操作系统:Ubuntu 24.04
我错过了什么?如何让它发挥作用?
Ubuntu libxml2-utils 软件包在
/usr/bin/
上安装 xmllint,如dpkg -L libxml2-utils | grep 'xmllint'
但构建是从 /usr/local/bin.
中挑选它
可能存在版本不匹配的情况。参见
/usr/local/bin/xmllint --version