我有最后一个 debian 版本,我尝试了很多次安装 wg,但没有成功,这里是我在终端中的命令行:
: ~ / Downloads $ sudo apt install wireguard
Reading Package Lists ... Done
Building the dependency tree
Reading status information ... Done
E: Cannot find the wireguard package
james @ ninja: ~ / Downloads $ cd
james @ ninja: ~ $ sudo dpkg --force-all -i wireguard
dpkg: error: cannot access archive 'wireguard': No file or folder of this type
james @ ninja: ~ $ apt update
Reading Package Lists ... Done
E: Unable to open lock file / var / lib / apt / lists / lock - open (13: Permission not granted)
E: Unable to lock directory / var / lib / apt / lists /
W: Problem with removing link /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission not granted)
W: Problem with removing link /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission not granted)
james @ ninja: ~ $ apt install wireguard-dkms wireguard-tools
E: Unable to open lock file / var / lib / dpkg / lock-frontend - open (13: Permission not granted)
E: Failed to get dpkg lock (/ var / lib / dpkg / lock-frontend). Do you have superuser rights?
james @ ninja: ~ $ su
Password :
root @ ninja: / home / james # apt update
Achieved: 1 http://security.debian.org/debian-security buster / updates InRelease
Reached: 2 http://debian.mirror.iweb.ca/debian buster InRelease
Achieved: 3 http://debian.mirror.iweb.ca/debian buster-updates InRelease
Reached: 4 https://dl.winehq.org/wine-builds/debian buster InRelease
Reached: 5 http://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_10 ./ InRelease
Reading Package Lists ... Done
Building the dependency tree
Reading status information ... Done
All packages are up to date.
root @ ninja: / home / james # apt install wireguard-dkms wireguard-tools
Reading Package Lists ... Done
Building the dependency tree
Reading status information ... Done
E: Could not find wireguard-dkms package
E: Cannot find wireguard-tools package
答案1
Buster 向后移植上可用的软件包:
echo "deb http://deb.debian.org/debian/ buster-backports main " | \
sudo tee /etc/apt/sources.list.d/buster-backports.list
sudo apt update
sudo apt install -t buster-backports wireguard-dkms wireguard-tools