如何在 Debian 9 安裝 software-properties-common

如何在 Debian 9 安裝 software-properties-common

我被這個問題困擾了:-

# apt-get install software-properties-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package software-properties-common

有人可以告訴我如何解決這個問題嗎?

這是 apt-cache 策略的輸出

apt-cache policy
Package files:
 100 /var/lib/dpkg/status
 release a=now
1000 http://downloads.mariadb.com/Tools/debian stretch/main amd64   Packages
 release o=MariaDB Enterprise,n=stretch,l=MariaDB,c=main,b=amd64
 origin downloads.mariadb.com
1000 http://downloads.mariadb.com/MaxScale/2.3/debian stretch/main amd64 Packages
 release o=MariaDB,n=stretch,l=MariaDB Maxscale repository,c=main,b=amd64
 origin downloads.mariadb.com
1000 http://downloads.mariadb.com/MariaDB/mariadb-10.3/repo/debian stretch/main amd64 Packages
 release o=MariaDB,n=stretch,l=MariaDB,c=main,b=amd64
 origin downloads.mariadb.com
 500 http://mariadb.nethub.com.hk/repo/10.3/debian stretch/main ppc64el Packages
 release o=MariaDB,n=stretch,l=MariaDB,c=main,b=ppc64el
 origin mariadb.nethub.com.hk
 500 http://mariadb.nethub.com.hk/repo/10.3/debian stretch/main i386  Packages
 release o=MariaDB,n=stretch,l=MariaDB,c=main,b=i386
 origin mariadb.nethub.com.hk
 500 http://mariadb.nethub.com.hk/repo/10.3/debian stretch/main amd64 Packages
 release o=MariaDB,n=stretch,l=MariaDB,c=main,b=amd64
 origin mariadb.nethub.com.hk
 500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
 release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=main,b=amd64
 origin security.debian.org
Pinned packages:

答案1

您的儲存庫配置不包括 Debian 9 儲存庫(安全儲存庫除外);你需要確保你/etc/apt/sources.list至少包含

deb http://deb.debian.org/debian stretch main
deb http://deb.debian.org/debian stretch-updates main
deb http://security.debian.org stretch/updates main

答案2

自從軟體包software-properties-common肯定存在於 Debian 9 中,問題一定出在您正在使用的儲存庫鏡像中。

嘗試使用不同的儲存庫。

相關內容