当前位置: 首页 > news >正文

Linux - 弯路系列3:安装和编译libvirt-4.5.0

系统:Anolis8(离线)

目录

  • 1、步骤
  • 2、make过程中的错误
    • 错误1:error: 'xdr_u_int64_t' undeclared (first use in this function)
  • 3、make install的错误
    • 错误1:/usr/bin/mkdir -p ""/usr/local/etc/libvirt/nwfilter""
  • 4、检查过程中的错误

1、步骤

感谢提供步骤和错误解决参考:https://www.codeleading.com/article/1288836853/

  • tar -xvf libvirt-4.5.0.tar.xz 【安装包:https://download.libvirt.org/】
  • cd libvirt-4.5.0
  • ./autogen.sh
  • make
  • make install
  • 完成后检查:
    – 查看:virsh list --all
    – 开启libvirt:libvirtd -d
    – 查看是否启动:ps -le | grep libvirtd

2、make过程中的错误

错误1:error: ‘xdr_u_int64_t’ undeclared (first use in this function)

  CCLD     libvirt_secret.laCC       remote/libvirt_driver_remote_la-remote_driver.loCC       remote/libvirt_driver_remote_la-remote_protocol.lo
In file included from remote/remote_protocol.h:18,from remote/remote_protocol.c:7:
remote/remote_protocol.c: In function 'xdr_remote_vcpu_info':
./util/virxdrdefs.h:28:24: warning: implicit declaration of function 'xdr_u_int64_t'; did you mean 'xdr_uint64_t'? [-Wimplicit-function-declaration]#  define xdr_uint64_t xdr_u_int64_t^~~~~~~~~~~~~
remote/remote_protocol.c:272:15: note: in expansion of macro 'xdr_uint64_t'if (!xdr_uint64_t (xdrs, &objp->cpu_time))^~~~~~~~~~~~
./util/virxdrdefs.h:28:24: warning: nested extern declaration of 'xdr_u_int64_t' [-Wnested-externs]#  define xdr_uint64_t xdr_u_int64_t^~~~~~~~~~~~~
remote/remote_protocol.c:272:15: note: in expansion of macro 'xdr_uint64_t'if (!xdr_uint64_t (xdrs, &objp->cpu_time))^~~~~~~~~~~~
remote/remote_protocol.c: In function 'xdr_remote_node_get_cells_free_memory_ret':
./util/virxdrdefs.h:28:24: error: 'xdr_u_int64_t' undeclared (first use in this function); did you mean 'xdr_uint64_t'?#  define xdr_uint64_t xdr_u_int64_t^~~~~~~~~~~~~
remote/remote_protocol.c:664:48: note: in expansion of macro 'xdr_uint64_t'sizeof (uint64_t), (xdrproc_t) xdr_uint64_t))^~~~~~~~~~~~
./util/virxdrdefs.h:28:24: note: each undeclared identifier is reported only once for each function it appears in#  define xdr_uint64_t xdr_u_int64_t^~~~~~~~~~~~~
remote/remote_protocol.c:664:48: note: in expansion of macro 'xdr_uint64_t'sizeof (uint64_t), (xdrproc_t) xdr_uint64_t))^~~~~~~~~~~~
remote/remote_protocol.c: In function 'xdr_remote_node_get_free_pages_ret':
./util/virxdrdefs.h:28:24: error: 'xdr_u_int64_t' undeclared (first use in this function); did you mean 'xdr_uint64_t'?#  define xdr_uint64_t xdr_u_int64_t^~~~~~~~~~~~~
remote/remote_protocol.c:6825:48: note: in expansion of macro 'xdr_uint64_t'sizeof (uint64_t), (xdrproc_t) xdr_uint64_t))^~~~~~~~~~~~
remote/remote_protocol.c: In function 'xdr_remote_node_alloc_pages_args':
./util/virxdrdefs.h:28:24: error: 'xdr_u_int64_t' undeclared (first use in this function); did you mean 'xdr_uint64_t'?#  define xdr_uint64_t xdr_u_int64_t^~~~~~~~~~~~~
remote/remote_protocol.c:6840:48: note: in expansion of macro 'xdr_uint64_t'sizeof (uint64_t), (xdrproc_t) xdr_uint64_t))^~~~~~~~~~~~
make[3]: *** [Makefile:10507: remote/libvirt_driver_remote_la-remote_protocol.lo] Error 1
make[3]: Leaving directory '/home/software/libvirt-3.2.0/libvirt-4.5.0/src'
make[2]: *** [Makefile:6429: all] Error 2
make[2]: Leaving directory '/home/software/libvirt-3.2.0/libvirt-4.5.0/src'
make[1]: *** [Makefile:2107: all-recursive] Error 1
make[1]: Leaving directory '/home/software/libvirt-3.2.0/libvirt-4.5.0'
make: *** [Makefile:2000: all] Error 2

解决:
解决来源:https://listman.redhat.com/archives/libvir-list/2013-May/077764.html
但是这个作者好像不是这一个原因

  • 在“./autogen.sh”后进行操作
  • grep -rn “XDR_CFLAGS =” * 为了查看包含XDR_CFLAGS定义的文件
  • 分别打开Makefilesrc/Makefile文件,找到其中的XDR_CFLAGS = 定义行,添加上-I/usr/include/tirpc
    即:XDR_CFLAGS = -I/usr/include/tirpc
  • 再进行make即可

注:因为我是一起加的,所以不确定是不是只用添加Makefilesrc/Makefile这两个文件其中之一即可,可自行尝试。

3、make install的错误

错误1:/usr/bin/mkdir -p “”/usr/local/etc/libvirt/nwfilter""

解决:

  • **grep -rn “NWFILTER_DIR” *** 【找到nwfilter文件的生成路径】
    在这里插入图片描述
  • 删除2149、2722行多出来的引号

4、检查过程中的错误

参考:https://blog.csdn.net/yang39921/article/details/103296169
非常感谢分享!

相关文章:

Linux - 弯路系列3:安装和编译libvirt-4.5.0

系统:Anolis8(离线) 目录 1、步骤2、make过程中的错误错误1:error: xdr_u_int64_t undeclared (first use in this function) 3、make install的错误错误1:/usr/bin/mkdir -p ""/usr/local/etc/libvirt/nwf…...

Jenkins插件使用问题总结

Git Push插件 插件介绍 主要是用于git推送代码到远程仓库中使用,插件地址 pipeline中使用 官方说明中只有一句代码gitPush(gitScm: scm, targetBranch: env.BRANCH_NAME, targetRepo: origin) 流水线语法中也做的不齐全所以一开始我老是设置错,导致代…...

u盘怎么重装电脑系统_u盘重装电脑系统步骤和详细教程【新手宝典】

u盘怎么重装电脑系统?一个u盘怎么重装电脑系统呢,需要将u盘制作成u盘启动盘pe,然后通过U盘启动盘进入pe进行安装系统,下面小编就教大家u盘重装电脑系统步骤和详细教程。 u盘启动是什么意思? U盘启动盘是一种具有特殊功…...

Sql server查询数据库表的数量

SELECT count(*) FROM sys.objects WHERE typeU --统计表数量 SELECT NAME FROM sys.objects WHERE typeU --列出表名称 或者 SELECT COUNT(*) FROM SysObjects Where XTypeU --统计表数量 SELECT Name FROM SysObjects Where XTypeU --列出表名称 --判断字…...

Linux学习笔记之软件包管理RPM与YUM

RPM包的管理 介绍 RPM(RedHat Package Manager)用于互联网下载包的打包及安装工具,它包含在某些Linux分发版中。他生成具有.RPM扩展名的文件。RPM类似Windows的setup.exe,这一文件格式虽然打上了RedHat的标志,但理念…...

15分钟学 Go 第 41 天:中间件的使用

第41天:中间件的使用 目标:学习如何在Go语言的Web服务中使用中间件 中间件(Middleware)是Web开发中的一种常见设计模式,通常用于处理请求和响应过程中的一些共通功能。比如:日志记录、认证授权、请求处理…...

《Python 与 SQLite:强大的数据库组合》

《Python 与 SQLite:强大的数据库组合》 一、Python 与 SQLite 的结合二、安装与连接(一)安装 SQLite 模块(二)连接到数据库 三、数据库操作(一)创建表格(二)插入数据&am…...

Golang | Leetcode Golang题解之第552题学生出勤记录II

题目: 题解: const mod int 1e9 7type matrix [6][6]intfunc (a matrix) mul(b matrix) matrix {c : matrix{}for i, row : range a {for j : range b[0] {for k, v : range row {c[i][j] (c[i][j] v*b[k][j]) % mod}}}return c }func (a matrix) p…...

Vue3 常用代码指南手抄,超详细 cheatsheet

一、Vue3 基础 1.1 创建 Vue3 项目 使用 Vite 创建 npm create vitelatest my-vue-app -- --template vue cd my-vue-app npm install npm run dev使用 Vue CLI 创建 npm install -g vue/cli vue create my-vue-app1.2 项目结构 my-vue-app ├── node_modules ├── pu…...

结构体是否包含特定类型的成员变量

结构体是否包含特定类型的成员变量 在C中,可以使用模板元编程和类型特性(type traits)来判断一个结构体是否包含特定类型的成员变量。这通常通过std::is_member_object_pointer类型特性来实现,它可以用来检查给定的成员指针是否指…...

堆排序与链式二叉树:数据结构与排序算法的双重探索

大家好,我是小卡皮巴拉 文章目录 目录 引言 一.堆排序 1.1 版本一 核心概念 堆排序过程 1.2 版本二 堆排序函数 HeapSort 向下调整算法 AdjustDown 向上调整算法 AdjustUp 二.链式二叉树 2.1 前中后序遍历 链式二叉树的结构 创建链式二叉树 前序遍历…...

用 Python 从零开始创建神经网络(四):激活函数(Activation Functions)

激活函数(Activation Functions) 引言1. 激活函数的种类a. 阶跃激活功能b. 线性激活函数c. Sigmoid激活函数d. ReLU 激活函数e. more 2. 为什么使用激活函数3. 隐藏层的线性激活4. 一对神经元的 ReLU 激活5. 在隐蔽层中激活 ReLU6. ReLU 激活函数代码7. …...

使用 Flask 和 ONLYOFFICE 实现文档在线编辑功能

提示:CSDN 博主测评ONLYOFFICE 文章目录 引言技术栈环境准备安装 ONLYOFFICE 文档服务器获取 API 密钥安装 Flask 和 Requests 创建 Flask 应用项目结构编写 app.py创建模板 templates/index.html 运行应用功能详解文档上传生成编辑器 URL显示编辑器回调处理 安全性…...

【C++】【算法基础】序列编辑距离

编辑距离 题目 给定 n n n个长度不超过 10 10 10 的字符串以及 m m m 次询问,每次询问给出一个字符串和一个操作次数上限。 对于每次询问,请你求出给定的 n n n个字符串中有多少个字符串可以在上限操作次数内经过操作变成询问给出的字符串。 每个…...

【Android】轮播图——Banner

引言 Banner轮播图是一种在网页和移动应用界面设计中常见的元素,主要用于在一个固定的区域内自动或手动切换一系列图片,以展示不同的内容或信息。这个控件在软件当中经常看到,商品促销、热门歌单、头像新闻等等。它不同于ViewPgaer在于无需手…...

学SQL,要安装什么软件?

先上结论,推荐MySQLDbeaver的组合。 学SQL需要安装软件吗? 记得几年前我学习SQL的时候,以为像Java、Python一样需要安装SQL软件包,后来知道并没有所谓SQL软件,因为SQL是一种查询语言,它用来对数据库进行操…...

webstorm 设置总结

编辑器-》文件类型-》忽略的文件和文件夹-》加上node_modules 修改WebStorm 内存有两种方式。 1. 点击菜单中的Help -> change memory settings 弹出设置内存窗口,修改最大内存大小。然后点击Save and Restart 即可。 2. 点击菜单中的Help -> Edit Custom V…...

基于Spring Boot的养老保险管理系统的设计与实现,LW+源码+讲解

摘 要 如今社会上各行各业,都喜欢用自己行业的专属软件工作,互联网发展到这个时候,人们已经发现离不开了互联网。新技术的产生,往往能解决一些老技术的弊端问题。因为传统养老保险管理系统信息管理难度大,容错率低&a…...

Java | Leetcode Java题解之第541题反转字符串II

题目&#xff1a; 题解&#xff1a; class Solution {public String reverseStr(String s, int k) {int n s.length();char[] arr s.toCharArray();for (int i 0; i < n; i 2 * k) {reverse(arr, i, Math.min(i k, n) - 1);}return new String(arr);}public void reve…...

sql分区

将学员表student按所在城市使用PARTITION BY LIST 1、创建分区表。 CREATE TABLE public.student( sno numeric(4,0)&#xff0c; sname character varying(20 char),gender character varying(2 char), phone numeric(11,0), …...

Appium+python自动化(十六)- ADB命令

简介 Android 调试桥(adb)是多种用途的工具&#xff0c;该工具可以帮助你你管理设备或模拟器 的状态。 adb ( Android Debug Bridge)是一个通用命令行工具&#xff0c;其允许您与模拟器实例或连接的 Android 设备进行通信。它可为各种设备操作提供便利&#xff0c;如安装和调试…...

【力扣数据库知识手册笔记】索引

索引 索引的优缺点 优点1. 通过创建唯一性索引&#xff0c;可以保证数据库表中每一行数据的唯一性。2. 可以加快数据的检索速度&#xff08;创建索引的主要原因&#xff09;。3. 可以加速表和表之间的连接&#xff0c;实现数据的参考完整性。4. 可以在查询过程中&#xff0c;…...

PL0语法,分析器实现!

简介 PL/0 是一种简单的编程语言,通常用于教学编译原理。它的语法结构清晰,功能包括常量定义、变量声明、过程(子程序)定义以及基本的控制结构(如条件语句和循环语句)。 PL/0 语法规范 PL/0 是一种教学用的小型编程语言,由 Niklaus Wirth 设计,用于展示编译原理的核…...

html css js网页制作成品——HTML+CSS榴莲商城网页设计(4页)附源码

目录 一、&#x1f468;‍&#x1f393;网站题目 二、✍️网站描述 三、&#x1f4da;网站介绍 四、&#x1f310;网站效果 五、&#x1fa93; 代码实现 &#x1f9f1;HTML 六、&#x1f947; 如何让学习不再盲目 七、&#x1f381;更多干货 一、&#x1f468;‍&#x1f…...

C++.OpenGL (20/64)混合(Blending)

混合(Blending) 透明效果核心原理 #mermaid-svg-SWG0UzVfJms7Sm3e {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-SWG0UzVfJms7Sm3e .error-icon{fill:#552222;}#mermaid-svg-SWG0UzVfJms7Sm3e .error-text{fill…...

数据结构第5章:树和二叉树完全指南(自整理详细图文笔记)

名人说&#xff1a;莫道桑榆晚&#xff0c;为霞尚满天。——刘禹锡&#xff08;刘梦得&#xff0c;诗豪&#xff09; 原创笔记&#xff1a;Code_流苏(CSDN)&#xff08;一个喜欢古诗词和编程的Coder&#x1f60a;&#xff09; 上一篇&#xff1a;《数据结构第4章 数组和广义表》…...

Linux入门(十五)安装java安装tomcat安装dotnet安装mysql

安装java yum install java-17-openjdk-devel查找安装地址 update-alternatives --config java设置环境变量 vi /etc/profile #在文档后面追加 JAVA_HOME"通过查找安装地址命令显示的路径" #注意一定要加$PATH不然路径就只剩下新加的路径了&#xff0c;系统很多命…...

codeforces C. Cool Partition

目录 题目简述&#xff1a; 思路&#xff1a; 总代码&#xff1a; https://codeforces.com/contest/2117/problem/C 题目简述&#xff1a; 给定一个整数数组&#xff0c;现要求你对数组进行分割&#xff0c;但需满足条件&#xff1a;前一个子数组中的值必须在后一个子数组中…...

React与原生事件:核心差异与性能对比解析

&#x1f49d;&#x1f49d;&#x1f49d;欢迎莅临我的博客&#xff0c;很高兴能够在这里和您见面&#xff01;希望您在这里可以感受到一份轻松愉快的氛围&#xff0c;不仅可以获得有趣的内容和知识&#xff0c;也可以畅所欲言、分享您的想法和见解。 推荐&#xff1a;「storms…...

CMake系统学习笔记

CMake系统学习笔记 基础操作 最基本的案例 // code #include <iostream>int main() {std::cout << "hello world " << std::endl;return 0; }// CMakeLists.txt cmake_minimum_required(VERSION 3.0)# 定义当前工程名称 project(demo)add_execu…...