如何在 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 中,问题一定出在您正在使用的存储库镜像中。

尝试使用不同的存储库。

相关内容