在 BeagleBone Green 卡上安装 MongoDB 仍然不成功。
有关此BBG的更多信息:
debian@beaglebone:/var/lib/cloud9$ uname -a
Linux beaglebone 4.9.82-ti-r102 #1 SMP PREEMPT Thu Feb 22 01:16:12 UTC 2018 armv7l GNU/Linux
debian@beaglebone:/var/lib/cloud9$ cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
即使我尝试按照以下教程:https://docs.mongodb.com/v3.0/tutorial/install-mongodb-on-debian/进行操作:
debian@beaglebone:/var/lib/cloud9$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
Executing: /tmp/apt-key-gpghome.jgT79mhjhQ/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
gpg: key 58712A2291FA4AD5: "MongoDB 3.6 Release Signing Key <packaging@mongodb.com>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
debian@beaglebone:/var/lib/cloud9$ echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 main
debian@beaglebone:/var/lib/cloud9$ echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/{+package-branch+} main" | sudo tee /etc/apt/sources.list.d/mongodb-org-{+version+}.list
deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/{+package-branch+} main
debian@beaglebone:/var/lib/cloud9$ sudo apt-get update
Ign:1 http://deb.debian.org/debian stretch InRelease
Hit:2 http://deb.debian.org/debian stretch-updates InRelease
Get:3 http://deb.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:4 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 InRelease
Hit:5 http://repos.rcn-ee.com/debian stretch InRelease
Hit:6 http://deb.debian.org/debian stretch Release
Get:7 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 Release [2393 B]
Get:8 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 Release.gpg [801 B]
Fetched 97.5 kB in 5s (17.8 kB/s)
Reading package lists... Done
N: Skipping acquire of configured file 'main/binary-armhf/Packages' as repository 'http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 InRelease' doesn't support architecture 'armhf'
debian@beaglebone:/var/lib/cloud9$ sudo apt-get install -y mongodb-org
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mongodb-org
debian@beaglebone:/var/lib/cloud9$ sudo apt-get install -y mongodb-org=3.6.4 mongodb-org-server=3.6.4 mongodb-org-shell=3.6.4 mongodb-org-mongos=3.6.4 mongodb-org-tools=3.6.4
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mongodb-org
E: Unable to locate package mongodb-org-server
E: Unable to locate package mongodb-org-shell
E: Unable to locate package mongodb-org-mongos
E: Unable to locate package mongodb-org-tools
debian@beaglebone:/var/lib/cloud9$ echo "mongodb-org hold" | sudo dpkg --set-selections
dpkg: warning: package not in status nor available database at line 1: mongodb-org
dpkg: warning: found unknown packages; this might mean the available database
is outdated, and needs to be updated through a frontend method;
please see the FAQ <https://wiki.debian.org/Teams/Dpkg/FAQ>
debian@beaglebone:/var/lib/cloud9$ echo "mongodb-org-server hold" | sudo dpkg --set-selections
dpkg: warning: package not in status nor available database at line 1: mongodb-org-server
dpkg: warning: found unknown packages; this might mean the available database
is outdated, and needs to be updated through a frontend method;
please see the FAQ <https://wiki.debian.org/Teams/Dpkg/FAQ>
debian@beaglebone:/var/lib/cloud9$ echo "mongodb-org-shell hold" | sudo dpkg --set-selections
dpkg: warning: package not in status nor available database at line 1: mongodb-org-shell
dpkg: warning: found unknown packages; this might mean the available database
is outdated, and needs to be updated through a frontend method;
please see the FAQ <https://wiki.debian.org/Teams/Dpkg/FAQ>
debian@beaglebone:/var/lib/cloud9$ echo "mongodb-org-mongos hold" | sudo dpkg --set-selections
dpkg: warning: package not in status nor available database at line 1: mongodb-org-mongos
dpkg: warning: found unknown packages; this might mean the available database
is outdated, and needs to be updated through a frontend method;
please see the FAQ <https://wiki.debian.org/Teams/Dpkg/FAQ>
debian@beaglebone:/var/lib/cloud9$ echo "mongodb-org-tools hold" | sudo dpkg --set-selections
dpkg: warning: package not in status nor available database at line 1: mongodb-org-tools
dpkg: warning: found unknown packages; this might mean the available database
is outdated, and needs to be updated through a frontend method;
please see the FAQ <https://wiki.debian.org/Teams/Dpkg/FAQ>
但问题仍然存在。
我该如何解决这个问题?
答案 0 :(得分:2)
该存储库没有提供ARMv7-HF软件包。
最简单的选择是使用Debian软件包:
sudo apt install mongodb
这将产生版本3.2.11,如下所示:https://packages.debian.org/stretch/mongodb
更复杂的选择是从源代码构建它。如果你直接在BBB上这样做,这可能需要很长时间!
对步骤的粗略猜测是:
sudo apt build-dep mongo
wget https://fastdl.mongodb.org/src/mongodb-src-r3.6.5.tar.gz
tar -xvzf mongodb-src-r3.6.5.tar.gz
cd mongodb-src-r3.6.5
dpkg-buildpackage -b
dpkg -i ../mongodb-org-bla-foo.deb
构建步骤可能由于各种原因而失败,例如:未解决的依赖关系。请确保下载最新版本以避免出现安全问题和稳定性问题,上述网址只是一个示例,仅在撰写本文时有效。