在codeanywhere中安装mongoDB时遇到麻烦

时间:2018-03-21 14:41:38

标签: mongodb web-deployment web-development-server codeanywhere

我在codeanywhere中安装mongoDB时遇到了麻烦。它通常显示..

cabox@box-codeanywhere:~/workspace$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.i9L1IwAn0P --no-auto-check-trustdb --trust-model always --keyring /etc/apt/
trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
gpg: requesting key 91FA4AD5 from hkp server keyserver.ubuntu.com
gpg: key 91FA4AD5: "MongoDB 3.6 Release Signing Key <packaging@mongodb.com>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
cabox@box-codeanywhere:~/workspace$ echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d
/mongodb-org-3.6.list
deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.6 multiverse
cabox@box-codeanywhere:~/workspace$ sudo apt-get update
E: The method driver /usr/lib/apt/methods/https could not be found.
N: Is the package apt-transport-https installed?
cabox@box-codeanywhere:~/workspace$ sudo apt-get install -y mongodb-org
Reading package lists... 1%
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mongodb-org
请帮助我

1 个答案:

答案 0 :(得分:0)

我有同样的问题,主要问题是回购使用https,因此Is the package apt-transport-https installed?

在添加任何https repos之前尝试安装apt-transport-https,看看是否有帮助。

我通过简单地销毁我的容器,创建一个新的容器(Ubuntu上的Node.js),运行sudo apt-get install apt-transport-https,然后sudo apt-get update,然后在this page上执行指令来完成此操作试图这样做