Ubuntu 19.10 无法找到 libnm-glib、libnm-glib-vpn 和 libnm-util 包

Ubuntu 19.10 无法找到 libnm-glib、libnm-glib-vpn 和 libnm-util 包

我一直在努力建立网络管理器适用于 Ubuntu 19.10 的插件,但 autogen.sh 一直失败,出现以下错误

checking for LIBNM_GLIB... no
configure: error: Package requirements (NetworkManager >= 1.2.0
    libnm-util >= 1.2.0
    libnm-glib >= 1.2.0
    libnm-glib-vpn >= 1.2.0) were not met:

No package 'NetworkManager' found
No package 'libnm-util' found
No package 'libnm-glib' found
No package 'libnm-glib-vpn' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBNM_GLIB_CFLAGS
and LIBNM_GLIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

openconnect 版本应该没问题

OpenConnect version v8.02-1build1
Using GnuTLS. Features present: TPMv2, PKCS#11, RSA software token, HOTP software token, TOTP software token, Yubikey OATH, System keys, DTLS, ESP
Supported protocols: anyconnect (default), nc, gp

当尝试安装缺失的软件包时,它们似乎已被删除/替换

sudo apt install libnm-util-dev libnm-glib-dev libnm-glib-vpn-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libnm-glib-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package libnm-glib-vpn-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package libnm-util-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libnm-util-dev' has no installation candidate
E: Package 'libnm-glib-dev' has no installation candidate
E: Package 'libnm-glib-vpn-dev' has no installation candidate

任何关于如何解决这个问题的建议都将非常感谢

答案1

libnm-glib和已弃用多年(自 1.0 版以来),最近已从上游 NetworkManager 中完全删除。它们也正在慢慢从发行版中消失。相反,应用程序应该libnm-util使用。libnm-glib-vpnlibnm

这需要移植所有弃用库的用户libnm(包括 VPN 插件)。这也是几年前完成的。

您链接到的 openconnect 存储库是https://gitlab.gnome.org/GNOME/NetworkManager-openconnect。此插件(与所有适用于 NM 的 Gnome VPN 插件一样)支持“新”的 libnm 和可选的弃用库。您只需传递一个配置选项即可不针对弃用库进行构建。fork 也有该选项:./configure --without-libnm-glib

答案2

您可以尝试使用以下方法重建 NetworkManager--with-libnm-glib

相关内容