Ошибка установки Wireguard: Невозможно исправить проблемы, у вас есть поврежденные пакеты. Тем не менее, пакеты не проводятся - PullRequest
1 голос
/ 17 января 2020

Установка Wireguard завершается неудачно с ошибками, описанными ниже на компьютере с Debian 10.

The following packages have unmet dependencies:
 wireguard : Depends: wireguard-dkms (>= 0.0.20191219) but it is not installable or
                      wireguard-modules (>= 0.0.20191219) but it is not installable
E: Unable to correct problems, you have held broken packages.

Однако следующая команда (запускается как root) не возвращает никаких выводов, указывающих, что пакеты не удерживаются.

dpkg --get-selections | grep hold 

Любая помощь очень ценится, поскольку в прошлом я не сталкивался с этой ошибкой.

Использовался следующий процесс, все команды выполняются как root:

echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable

apt clean
apt update
Hit:1 http://security.debian.org buster/updates InRelease                               
Hit:2 http://deb.debian.org/debian buster InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Hit:4 http://deb.debian.org/debian buster-backports InRelease
Hit:5 http://deb.debian.org/debian unstable InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.

apt install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

apt install wireguard
Reading package lists... Done
Building dependency tree       
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:
 wireguard : Depends: wireguard-dkms (>= 0.0.20191219) but it is not installable or
                      wireguard-modules (>= 0.0.20191219) but it is not installable
E: Unable to correct problems, you have held broken packages.

aptitude install wireguard
The following NEW packages will be installed:
  wireguard{b} wireguard-tools{a} 
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 91.6 kB of archives. After unpacking 344 kB will be used.
The following packages have unmet dependencies:
 wireguard : Depends: wireguard-dkms (>= 0.0.20191219) which is a virtual package and is not provided by any available package
 or
                      wireguard-modules (>= 0.0.20191219) which is a virtual package and is not provided by any available package

The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     wireguard [Not Installed]                          



Accept this solution? [Y/n/q/?] Y
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

aptitude why-not wireguard
Not currently installed
The candidate version 1.0.20200102-1 has priority optional
No dependencies require to remove wireguard

1 Ответ

0 голосов
/ 17 января 2020

Проблема была решена путем компиляции модуля с помощью учебника, найденного здесь: https://www.wireguard.com/compilation/

Мне не пришлось компилировать инструменты, поскольку они устанавливались нормально.

apt-get install libmnl-dev libelf-dev linux-headers-$(uname -r) build-essential pkg-config

git clone https://git.zx2c4.com/wireguard-linux-compat
git clone https://git.zx2c4.com/wireguard-tools

make -C wireguard-linux-compat/src -j$(nproc)
sudo make -C wireguard-linux-compat/src install
...