我正在运行 Ubuntu 16.04
NetworkManager --version
返回 1.2.6
我想更新到最新稳定版本(1.14.4)这里。
安装文档说“shell 命令‘./configure && make && make install’应该配置、构建和安装这个包。”
经过多次反复尝试后,我通过安装以下软件包成功完成 ./configure 并且没有报告任何错误:
apt-get install gtk-doc-tools libglib2.0-dev libudev-dev uuid-dev libnss3-dev ppp-dev libjansson-dev libcurl4-nss-dev libndp-dev libreadline-dev intltool
但是当我运行 make 时我得到:
mike@Ubuntu16:~/Downloads/NetworkManager-1.14.4$ make
make all-recursive
make[1]: Entering directory '/home/mike/Downloads/NetworkManager-1.14.4'
Making all in .
make[2]: Entering directory '/home/mike/Downloads/NetworkManager-1.14.4'
GEN config-extra.h
GEN libnm-core/nm-core-enum-types.h
CC clients/nm_online-nm-online.o
In file included from ./shared/nm-default.h:311:0,
from clients/nm-online.c:34:
./libnm/NetworkManager.h:60:27: fatal error: nm-enum-types.h: No such file or directory
compilation terminated.
Makefile:15265: recipe for target 'clients/nm_online-nm-online.o' failed
make[2]: *** [clients/nm_online-nm-online.o] Error 1
make[2]: Leaving directory '/home/mike/Downloads/NetworkManager-1.14.4'
Makefile:17770: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/mike/Downloads/NetworkManager-1.14.4'
Makefile:7864: recipe for target 'all' failed
make: *** [all] Error 2
任何帮助都将不胜感激。
答案1
从源代码构建时遇到依赖问题是正常且痛苦的。最好使用易于
首先,让我们看看负责 NetworkManager 的包
dpkg -S $(which NetworkManager)
这是网络管理器包。现在让我们看看我们有什么可用的
apt policy network-manager
在 U18 上我有 1.12.4。尝试升级网络管理器包裹。
sudo apt update
sudo apt install network-manager
如果你想要 ubuntu 18 网络管理器包,你可以尝试下面的
# WARNING! THIS IS DANGEROUS AND MIGHT BREAK YOUR SYSTEM. IT'S BEST TO REMOVE IT AFTER INSTALLING THE PACKAGE YOU WANT
echo 'deb http://us.archive.ubuntu.com/ubuntu bionic universe' | sudo tee -a /etc/apt/sources.list
sudo apt uddate
sudo apt install network-manager
还有一件事(这是瞎猜的);许多开发包都会有你需要的头文件。所以试试
sudo apt install network-manager-dev
答案2
好的,我从 freenode 上的 #nm 得到了答案。
您需要做的是运行“make -k”,然后运行“make”。
然后以 root 身份“make install”,你的机器上就会有最新稳定版本的 NetworkManager :-)
我也得到了这个补丁:
Date: Tue, 5 Mar 2019 10:18:03 +0100
Subject: [PATCH 1/1] build: fix build dependency for generating libnm
enum
headers before building nm-online
CC clients/nm_online-nm-online.o
In file included from ./shared/nm-default.h:311:0,
from clients/nm-online.c:34:
./libnm/NetworkManager.h:60:10: fatal error: nm-enum-types.h: No such
file or directory
#include "nm-enum-types.h"
^~~~~~~~~~~~~~~~~
---
Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile.am b/Makefile.am
index 005dbace18..b5dc5f9440 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3880,6 +3880,7 @@ clients_nm_online_LDADD = \
$(GLIB_LIBS)
$(clients_nm_online_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
+$(clients_nm_online_OBJECTS): $(libnm_lib_h_pub_mkenums)
EXTRA_DIST += \
clients/meson.build
--
2.20.1