Ubuntu 22.04上构建libvirt源码错误解决

简介: Ubuntu 22.04上构建libvirt源码错误解决

当在Ubuntu 22.04上构建libvirt源码时,可能会遇到一些错误。下面是一些常见错误及其解决方法:

1. 错误:Program 'xmllint’未找到或不可执行

解决方法:安装libxml2-utils

sudo apt-get install libxml2-utils

2. 错误:Program 'xsltproc’未找到或不可执行

解决方法:安装xsltproc

sudo apt install -y xsltproc

3. 错误:Run-time dependency fuse3未找到

解决方法:安装libfuse3-devlibfuse-dev

sudo apt-get install libfuse3-dev
sudo apt-get install libfuse-dev

4. 错误:Run-time dependency glib-2.0未找到

解决方法:安装libglib2.0-dev

sudo apt-get install libglib2.0-dev

5. 错误:Pkg-config二进制文件未找到

解决方法:安装pkg-config

sudo apt-get install pkg-config

6. 错误:Run-time dependency glusterfs-api未找到

解决方法:安装libglusterfs-dev

sudo apt-get install libglusterfs-dev

7. 错误:Run-time dependency gnutls未找到

解决方法:安装libgnutls28-dev

sudo apt-get install libgnutls28-dev

8. 错误:Run-time dependency libiscsi未找到

解决方法:安装libiscsi-dev

sudo apt-get install libiscsi-dev

9. 错误:Run-time dependency libnbd未找到

解决方法:安装libnbd-dev

sudo apt-get install libnbd-dev

10. 错误:Run-time dependency libnl-3.0未找到

解决方法:安装libnl-3-dev

sudo apt-get install libnl-3-dev

11. 错误:Run-time dependency libnl-route-3.0未找到

解决方法:安装libnl-route-3-dev

sudo apt-get install libnl-route-3-dev

12. 错误:Run-time dependency libparted未找到

解决方法:安装libparted-dev

sudo apt-get install libparted-dev

13. 错误:Run-time dependency pcap未找到

解决方法:安装libpcap-dev

sudo apt-get install libpcap-dev

14. 错误:Run-time dependency libssh未找到

解决方法:安装libssh-dev

sudo apt-get install libssh-dev

15. 错误:Run-time dependency libssh2未找到

解决方法:安装libssh2-1-dev

sudo apt-get install libssh2-1-dev

16. 错误:Run-time dependency libxml-2.0未找到

解决方法:安装libxml2-dev

sudo apt-get install libxml2-dev

17. 错误:Run-time dependency wireshark未找到

解决方法:安装libwireshark-dev

sudo apt install libwireshark-dev

18. 错误:Run-time dependency yajl未找到

解决方法:安装libyajl-dev

sudo apt install libyajl-dev

19. 错误:Program xgettext未找到、Program msgfmt未找到、Program msgmerge未找到

解决方法:安装gettext工具集

sudo apt-get update
sudo apt-get install gettext

20. 错误:Run-time dependency numa未找到

解决方法:安装libnuma-dev

sudo apt-get install libnuma-dev

21.docs/meson.build:176:2: ERROR: Program ‘rst2html5 rst2html5.py rst2html5-3’ not found or not executable

pip uninstall rst2html5
pip install docutils

22.安装所需的依赖库和工具:

sudo apt-get install libxml2-utils xsltproc pkg-config libfuse3-dev libfuse-dev libglib2.0-dev libglusterfs-dev libgnutls28-dev libiscsi-dev libnbd-dev libnl-3-dev libnl-route-3-dev libparted-dev libpcap-dev libssh-dev libssh2-1-dev libxml2-dev wireshark-dev libyajl-dev gettext libnuma-dev libopenwsman-dev libpciaccess-dev librbd-dev librados-dev libreadline-dev libsasl2-dev
pip uninstall rst2html5
pip install docutils

23.原始记录:

https://github.com/libvirt/libvirt.git

meson.build:803:2: ERROR: Program 'xmllint' not found or not executable
sudo apt-get  install libxml2-utils

meson.build:803:2: ERROR: Program 'xsltproc' not found or not executable
sudo apt install -y xsltproc

Run-time dependency fuse3 found: NO (tried pkgconfig and cmake)
Run-time dependency fuse found: NO (tried pkgconfig and cmake)
Run-time dependency glib-2.0 found: NO (tried cmake)

meson.build:969:0: ERROR: Pkg-config binary for machine 1 not found. Giving up.


sudo apt-get install pkg-config
sudo apt-get install libfuse3-dev
sudo apt-get install libfuse-dev
sudo apt-get install libglib2.0-dev


Run-time dependency glusterfs-api found: NO (tried pkgconfig and cmake)
Run-time dependency gnutls found: NO (tried pkgconfig and cmake)
sudo apt-get install libglusterfs-dev
sudo apt-get install libgnutls28-dev


Run-time dependency libiscsi found: NO (tried pkgconfig and cmake)
Run-time dependency libnbd found: NO (tried pkgconfig and cmake)
Run-time dependency libnl-3.0 found: NO (tried pkgconfig and cmake)
Run-time dependency libnl-route-3.0 found: NO (tried pkgconfig and cmake)
Run-time dependency libparted found: NO (tried pkgconfig and cmake)
pcap-config found: NO need ['>=1.5.0']
Run-time dependency pcap found: NO (tried pkgconfig and config-tool)
Run-time dependency libssh found: NO (tried pkgconfig and cmake)
Run-time dependency libssh2 found: NO (tried pkgconfig and cmake)
Run-time dependency libxml-2.0 found: NO (tried pkgconfig and cmake)

# 安装libiscsi
sudo apt-get install libiscsi-dev

# 安装libnbd
sudo apt-get install libnbd-dev

# 安装libnl及其相关库
sudo apt-get install libnl-3-dev libnl-route-3-dev

# 安装libparted
sudo apt-get install libparted-dev

# 安装pcap(此处报错可能是由于版本要求,先尝试安装最新版)
sudo apt-get install libpcap-dev

# 安装libssh
sudo apt-get install libssh-dev

# 安装libssh2
sudo apt-get install libssh2-1-dev

# 安装libxml2
sudo apt-get install libxml2-dev

Run-time dependency wireshark found: NO (tried pkgconfig and cmake)
Run-time dependency yajl found: NO (tried pkgconfig and cmake)
sudo apt install libwireshark-dev
sudo apt install libyajl-dev


Program xgettext found: NO
Program msgfmt found: NO
Program msgmerge found: NO
Run-time dependency numa found: NO (tried pkgconfig and cmake)
Run-time dependency openwsman found: NO (tried pkgconfig and cmake)
Run-time dependency parallels-sdk found: NO (tried pkgconfig and cmake)
Run-time dependency pciaccess found: NO (tried pkgconfig and cmake)
Library rbd found: NO
Library rados found: NO
Run-time dependency readline found: NO (tried pkgconfig and cmake)
Library readline found: NO
Run-time dependency libsanlock_client found: NO (tried pkgconfig and cmake)
Run-time dependency libsasl2 found: NO (tried pkgconfig and cmake)
Run-time dependency libselinux found: YES 3.3
Run-time dependency threads found: YES
Run-time dependency libudev found: YES 249
Library util found: YES
Run-time dependency wireshark found: YES 3.6.2
Check usable header "wireshark/ws_version.h" : YES 
Run-time dependency yajl found: YES 2.1.0
Program pkcheck found: YES (/usr/bin/pkcheck)

meson.build:1452:2: ERROR: Problem encountered: You must install the pciaccess module to build with udev


# 安装gettext工具集(包含xgettext, msgfmt, msgmerge)
sudo apt-get update
sudo apt-get install gettext

# 安装numa库
sudo apt-get install libnuma-dev

# 安装openwsman库
sudo apt-get install libopenwsman-dev

# 安装parallels-sdk库(如果适用你的系统,否则跳过)
# 根据官方文档或源码自行编译安装

# 安装pciaccess库
sudo apt-get install libpciaccess-dev

# 安装rbd和rados库(Ceph库的一部分)
sudo apt-get install librbd-dev librados-dev

# 安装readline库
sudo apt-get install libreadline-dev

# 安装libsanlock_client库(如果可用,否则可能需要从源码编译)
# 根据官方文档或源码自行编译安装

# 安装libsasl2库
sudo apt-get install libsasl2-dev

# 已找到libselinux和libudev,无需额外安装

# 已找到wireshark和yajl,无需额外安装

# 虽然最后一条错误提示与pciaccess有关,但根据前面的日志,pciaccess已经找到了,可能是meson配置文件内部逻辑有误。
# 如果您确认pciaccess已安装并且版本符合要求,可以尝试清理并重新配置meson,或者检查项目的meson.build文件。

Program rst2html5 rst2html5.py rst2html5-3 found: NO

docs/meson.build:176:2: ERROR: Program 'rst2html5 rst2html5.py rst2html5-3' not found or not executable

A full log can be found at /root/CLionProjects/libvirt/buildDir/meson-logs/meson-log.txt

pip uninstall rst2html5
pip install docutils

相关文章
|
3月前
|
Ubuntu 开发工具 Android开发
Repo下载AOSP源码:基于ubuntu22.04 环境配置,android-12.0.0_r32
本文介绍了在基于Ubuntu 22.04的环境下配置Python 3.9、安装repo工具、下载和同步AOSP源码包以及处理repo同步错误的详细步骤。
222 0
Repo下载AOSP源码:基于ubuntu22.04 环境配置,android-12.0.0_r32
|
1月前
|
Ubuntu 应用服务中间件 nginx
Ubuntu安装笔记(三):ffmpeg(3.2.16)源码编译opencv(3.4.0)
本文是关于Ubuntu系统中使用ffmpeg 3.2.16源码编译OpenCV 3.4.0的安装笔记,包括安装ffmpeg、编译OpenCV、卸载OpenCV以及常见报错处理。
141 2
Ubuntu安装笔记(三):ffmpeg(3.2.16)源码编译opencv(3.4.0)
|
24天前
|
Ubuntu 编译器 计算机视觉
Ubuntu系统编译OpenCV4.8源码
【10月更文挑战第17天】只要三步即可搞定,第一步是下载指定版本的源码包;第二步是安装OpenCV4.8编译需要的编译器与第三方库支持;第三步就是编译OpenCV源码包生成安装文件并安装。
|
1月前
|
缓存 NoSQL Ubuntu
大数据-39 Redis 高并发分布式缓存 Ubuntu源码编译安装 云服务器 启动并测试 redis-server redis-cli
大数据-39 Redis 高并发分布式缓存 Ubuntu源码编译安装 云服务器 启动并测试 redis-server redis-cli
55 3
|
2月前
|
Ubuntu 编译器 C语言
Ubuntu 源码编译指定版本 make:神秘代码背后的激情冒险,等你来战!
【9月更文挑战第8天】在Ubuntu中,编译指定版本的源码`make`是一项挑战但也极具价值的任务。它允许我们根据特定需求定制软件,提升性能与功能适配。首先需安装必要工具包如GCC等;接着下载所需源码并阅读相关文档以了解编译要求。通过运行`./configure`、`make`及`sudo make install`命令完成编译安装流程。过程中可能遇到依赖项缺失或编译选项设置不当等问题,需根据错误提示逐一解决。对于大型项目,可利用多核编译加快速度。掌握这一技能有助于更好地探索开源世界。
45 2
|
2月前
|
Ubuntu NoSQL
ubuntu上安装某个程序的符号表和源码包
ubuntu上安装某个程序的符号表和源码包
|
3月前
|
Ubuntu Linux
ubuntu源码编译指定版本make
以上内容涵盖了在Ubuntu中编译安装指定版本软件的全过程,这是一个技术性很强的操作,不仅可以带来定制化的安装体验,同时也能增加对系统管理和软件构建流程的理解。遵循以上步骤,任何有一定基础的用户都能够按需编译和安装软件。
57 8
|
3月前
|
Ubuntu 编译器 C语言
Ubuntu 源码编译指定版本 make:神秘代码背后的激情冒险,等你来战!
【8月更文挑战第19天】在Ubuntu中编译指定版本的`make`工具是一项高级技巧,能让你针对特定需求定制软件。首先确保已安装`build-essential`等必要组件。下载所需版本源码后,遵循README指南配置与编译。使用`./configure`检测环境,`make`编译,最后`sudo make install`安装。面对问题如缺失依赖或编译选项不当,需耐心解决。对于大型项目,可利用多核加速编译,如`make -j 4`。这一过程虽具挑战,却能显著提升软件性能与功能适配。
72 2
|
3月前
|
Ubuntu 开发工具 Android开发
Repo下载、编译AOSP源码:基于Ubuntu 21.04,android-12.1.0_r27
文章记录了作者在Ubuntu 21.04服务器上配置环境、下载并编译基于Android 12.1.0_r27版本的AOSP源码的过程,包括解决编译过程中遇到的问题和错误处理方法。
186 0
|
4月前
|
Ubuntu 编译器 计算机视觉
Ubuntu系统下编译OpenCV4.8源码
在Ubuntu上源码安装OpenCV 4.8分为三步:1) 下载源码包,使用`wget`命令;2) 安装依赖,如`g++`, `cmake`, `make`等;3) 创建编译目录,运行`cmake`配置,接着`make`编译,最后`sudo make install`安装。安装完成后,通过编写和运行一个简单的OpenCV C++程序来验证环境配置正确性。
131 10