我正在尝试为学校项目设置邮件服务器,并且我想安装 postfix,但运行时apt-get install postfix
出现错误。
在此之前我也运行过 apt-get update upgrade 但也出现了错误NO_PUBKEY 16126d3a3e5c1192
。
结果apt-cache policy ssl-cert postfix; lsb_release -a
:
ssl-cert:
Installed: (none)
Candidate: (none)
Version table:
postfix:
Installed: (none)
Candidate: 2.11.0-1ubuntu1
Version table:
2.11.0-1ubuntu1 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64
Packages
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
apt-get install ssl-cert
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ssl-cert is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'ssl-cert' has no installation candidate
答案1
您的 NO_PUBKEY 问题
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 16126d3a3e5c1192
sudo apt-get update
并且你没有main
启用存储库
sudo apt-add-repository main
sudo apt-get update
sudo apt-get install postfix
如果software-properties-common
没有安装(我们需要apt-add-repository
)
cd
wget http://mirrors.kernel.org/ubuntu/pool/main/s/software-properties/software-properties-common_0.92.37.5_all.deb
sudo dpkg -i software-properties-common_0.92.37.5_all.deb
sudo apt-get update
sudo apt-get install -f
或者使用这个/etc/apt/sources.list
,别忘了开始
sudo apt-get update
sudo apt-get install -f
后替换以下内容
# See http://heus.archive.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu trusty restricted universe main multiverse
deb-src http://us.archive.ubuntu.com/ubuntu trusty main universe restricted multiverse #Added by software-properties
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu trusty-updates restricted universe main multiverse
deb-src http://us.archive.ubuntu.com/ubuntu trusty-updates restricted universe main multiverse #Added by software-properties
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu trusty-security restricted universe main multiverse
deb-src http://us.archive.ubuntu.com/ubuntu trusty-security restricted universe main multiverse #Added by software-properties
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://us.archive.canonical.com/ubuntu trusty partner
# deb-src http://us.archive.canonical.com/ubuntu trusty partner
deb http://us.archive.ubuntu.com/ubuntu trusty-backports main universe restricted multiverse
deb-src http://us.archive.ubuntu.com/ubuntu trusty-backports main universe restricted multiverse #Added by software-properties