我正在尝试mongodb-org
按照此处的说明进行安装:
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
命令如下:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
但这会导致以下结果:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package mongodb-org 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 'mongodb-org' has no installation candidate
任何帮助是极大的赞赏。
谢谢。
答案1
这是用户错误。我在 /etc/apt/preferences.d/50mongo 中有一个条目。删除该条目后,上述命令可以正常运行,不会出现错误。