尝试安装“network-manager-sstp”依赖项时循环,如“./configure”输出所示:

尝试安装“network-manager-sstp”依赖项时循环,如“./configure”输出所示:

我正在尝试安装网络管理器 sstp,但我在尝试安装依赖项时陷入循环。./configure输出在告诉我缺少两个不同的依赖项 (libnmalibnm-gtk) 之间摇摆 - 每当我安装一个依赖项时,它都会抱怨没有另一个依赖项,无论我在一分钟前安装了它。

这是怎么发生的以及我该如何解决它?

事情是这样的:

$ ./configure

configure: error: Package requirements (libnm-gtk >= 1.2.0) were not met:

No package 'libnm-gtk' 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_GTK_CFLAGS
and LIBNM_GTK_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

...所以我去安装它

$ sudo apt-get install libnm-gtk-dev

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 gir1.2-nm-1.0 : Breaks: gir1.2-networkmanager-1.0 (< 1.8.0-2) but 1.6.2-3+deb9u2 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

...所以我继续安装gir1.2-networkmanager-1.0

$ sudo apt-get install gir1.2-networkmanager-1.0

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  evolution-data-server evolution-data-server-common gir1.2-accountsservice-1.0 gir1.2-gck-1 gir1.2-gcr-3
  gir1.2-gdesktopenums-3.0 gir1.2-gdm-1.0 gir1.2-geoclue-2.0 gir1.2-gnomebluetooth-1.0 gir1.2-gnomedesktop-3.0
  gir1.2-graphene-1.0 gir1.2-gweather-3.0 gir1.2-json-1.0 gir1.2-mutter-7 gir1.2-polkit-1.0 gir1.2-rsvg-2.0
  gir1.2-soup-2.4 gir1.2-upowerglib-1.0 gjs gnome-backgrounds gnome-menus gnome-session-bin gnome-session-common
  gnome-shell-common gstreamer1.0-pipewire libcamel-1.2-62 libdbus-glib-1-dev libdbus-glib-1-dev-bin libebackend-1.2-10
  libebook-1.2-20 libebook-contacts-1.2-3 libecal-2.0-1 libedata-book-1.2-26 libedata-cal-2.0-1 libedataserver-1.2-25
  libedataserverui-1.2-2 libgdata-common libgdata22 libgdm1 libgjs0g libgnome-autoar-0-0 libmozjs-78-0 libmutter-7-0
  libnm-gtk0 mutter-common network-manager-dev switcheroo-control xwayland
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  gir1.2-nm-1.0 gir1.2-nma-1.0 libnm-dev libnma-dev
The following NEW packages will be installed:
  gir1.2-networkmanager-1.0
0 upgraded, 1 newly installed, 4 to remove and 5 not upgraded.
Need to get 0 B/310 kB of archives.
After this operation, 10.9 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 348213 files and directories currently installed.)
Removing libnma-dev:amd64 (1.8.30-1) ...
Removing libnm-dev:amd64 (1.30.0-2) ...
Removing gir1.2-nma-1.0:amd64 (1.8.30-1) ...
Removing gir1.2-nm-1.0:amd64 (1.30.0-2) ...
Selecting previously unselected package gir1.2-networkmanager-1.0:amd64.
(Reading database ... 347899 files and directories currently installed.)
Preparing to unpack .../gir1.2-networkmanager-1.0_1.6.2-3+deb9u2_amd64.deb ...
Unpacking gir1.2-networkmanager-1.0:amd64 (1.6.2-3+deb9u2) ...
Setting up gir1.2-networkmanager-1.0:amd64 (1.6.2-3+deb9u2) ...

...然后成功完成libnm-gtk-dev的安装

$ sudo apt-get install libnm-gtk-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  evolution-data-server evolution-data-server-common gir1.2-accountsservice-1.0 gir1.2-gck-1 gir1.2-gcr-3 gir1.2-gdesktopenums-3.0 gir1.2-gdm-1.0 gir1.2-geoclue-2.0
  gir1.2-gnomebluetooth-1.0 gir1.2-gnomedesktop-3.0 gir1.2-graphene-1.0 gir1.2-gweather-3.0 gir1.2-json-1.0 gir1.2-mutter-7 gir1.2-polkit-1.0 gir1.2-rsvg-2.0 gir1.2-soup-2.4
  gir1.2-upowerglib-1.0 gjs gnome-backgrounds gnome-menus gnome-session-bin gnome-session-common gnome-shell-common gstreamer1.0-pipewire libcamel-1.2-62 libebackend-1.2-10
  libebook-1.2-20 libebook-contacts-1.2-3 libecal-2.0-1 libedata-book-1.2-26 libedata-cal-2.0-1 libedataserver-1.2-25 libedataserverui-1.2-2 libgdata-common libgdata22 libgdm1 libgjs0g
  libgnome-autoar-0-0 libmozjs-78-0 libmutter-7-0 mutter-common switcheroo-control xwayland
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  gir1.2-nmgtk-1.0 libnm-glib-dev libnm-util-dev
The following NEW packages will be installed:
  gir1.2-nmgtk-1.0 libnm-glib-dev libnm-gtk-dev libnm-util-dev
0 upgraded, 4 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/992 kB of archives.
After this operation, 6,471 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package gir1.2-nmgtk-1.0:amd64.
(Reading database ... 347906 files and directories currently installed.)
Preparing to unpack .../gir1.2-nmgtk-1.0_1.4.4-1+deb9u1_amd64.deb ...
Unpacking gir1.2-nmgtk-1.0:amd64 (1.4.4-1+deb9u1) ...
Selecting previously unselected package libnm-util-dev:amd64.
Preparing to unpack .../libnm-util-dev_1.6.2-3+deb9u2_amd64.deb ...
Unpacking libnm-util-dev:amd64 (1.6.2-3+deb9u2) ...
Selecting previously unselected package libnm-glib-dev:amd64.
Preparing to unpack .../libnm-glib-dev_1.6.2-3+deb9u2_amd64.deb ...
Unpacking libnm-glib-dev:amd64 (1.6.2-3+deb9u2) ...
Selecting previously unselected package libnm-gtk-dev:amd64.
Preparing to unpack .../libnm-gtk-dev_1.4.4-1+deb9u1_amd64.deb ...
Unpacking libnm-gtk-dev:amd64 (1.4.4-1+deb9u1) ...
Setting up gir1.2-nmgtk-1.0:amd64 (1.4.4-1+deb9u1) ...
Setting up libnm-util-dev:amd64 (1.6.2-3+deb9u2) ...
Setting up libnm-glib-dev:amd64 (1.6.2-3+deb9u2) ...
Setting up libnm-gtk-dev:amd64 (1.4.4-1+deb9u1) ...

...然后尝试再次配置。现在我不再收到错误了:

$ ./configure

No package 'libnma' 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 LIBNMA_CFLAGS
and LIBNMA_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

...所以我去安装libnma

$ sudo apt-get install libnma-dev
        
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  evolution-data-server evolution-data-server-common gir1.2-accountsservice-1.0 gir1.2-gck-1 gir1.2-gcr-3
  gir1.2-gdesktopenums-3.0 gir1.2-gdm-1.0 gir1.2-geoclue-2.0 gir1.2-gnomebluetooth-1.0 gir1.2-gnomedesktop-3.0
  gir1.2-graphene-1.0 gir1.2-gweather-3.0 gir1.2-json-1.0 gir1.2-mutter-7 gir1.2-polkit-1.0 gir1.2-rsvg-2.0
  gir1.2-soup-2.4 gir1.2-upowerglib-1.0 gjs gnome-backgrounds gnome-menus gnome-session-bin gnome-session-common
  gnome-shell-common gstreamer1.0-pipewire libcamel-1.2-62 libdbus-glib-1-dev libdbus-glib-1-dev-bin libebackend-1.2-10
  libebook-1.2-20 libebook-contacts-1.2-3 libecal-2.0-1 libedata-book-1.2-26 libedata-cal-2.0-1 libedataserver-1.2-25
  libedataserverui-1.2-2 libgdata-common libgdata22 libgdm1 libgjs0g libgnome-autoar-0-0 libmozjs-78-0 libmutter-7-0
  libnm-glib4 libnm-gtk0 libnm-util2 mutter-common network-manager-dev switcheroo-control xwayland
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  gir1.2-nm-1.0 gir1.2-nma-1.0 libnm-dev
The following packages will be REMOVED:
  gir1.2-networkmanager-1.0
The following NEW packages will be installed:
  gir1.2-nm-1.0 gir1.2-nma-1.0 libnm-dev libnma-dev
0 upgraded, 4 newly installed, 1 to remove and 5 not upgraded.
Need to get 0 B/860 kB of archives.
After this operation, 10.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 347906 files and directories currently installed.)
Removing gir1.2-networkmanager-1.0:amd64 (1.6.2-3+deb9u2) ...
Selecting previously unselected package gir1.2-nm-1.0:amd64.
(Reading database ... 347899 files and directories currently installed.)
Preparing to unpack .../gir1.2-nm-1.0_1.30.0-2_amd64.deb ...
Unpacking gir1.2-nm-1.0:amd64 (1.30.0-2) ...
Selecting previously unselected package gir1.2-nma-1.0:amd64.
Preparing to unpack .../gir1.2-nma-1.0_1.8.30-1_amd64.deb ...
Unpacking gir1.2-nma-1.0:amd64 (1.8.30-1) ...
Selecting previously unselected package libnm-dev:amd64.
Preparing to unpack .../libnm-dev_1.30.0-2_amd64.deb ...
Unpacking libnm-dev:amd64 (1.30.0-2) ...
Selecting previously unselected package libnma-dev:amd64.
Preparing to unpack .../libnma-dev_1.8.30-1_amd64.deb ...
Unpacking libnma-dev:amd64 (1.8.30-1) ...
Setting up gir1.2-nm-1.0:amd64 (1.30.0-2) ...
Setting up gir1.2-nma-1.0:amd64 (1.8.30-1) ...
Setting up libnm-dev:amd64 (1.30.0-2) ...
Setting up libnma-dev:amd64 (1.8.30-1) ...

...并尝试再次配置:

$ ./configure

configure: error: Package requirements (libnm-gtk >= 1.2.0) were not met:

No package 'libnm-gtk' 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_GTK_CFLAGS
and LIBNM_GTK_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

...并且循环完成,它像这样(大概)永远循环:/

答案1

您的问题是由您的存储库设置引起的:libnma-dev从 Debian 11(或者可能不稳定)安装,但从libnm-gtk-devDebian 9 安装。安装一个会删除另一个,因为它们不兼容。

您需要选择 Debian 的一个版本或另一个版本;你不能将两者混合在一起并期望一切都能正常工作。

相关内容