如何在rspberry pi 4上安装mongoDB?
我正在尝试在Raspberry Pi 4 Model B运行Debian 11.3上安装MongoDB。
首先,我尝试通过运行命令 sudo apt-get安装mongodb
来使用APT-GET安装它,但是结果有以下错误: e:package'mongodb'没有安装候选。
在阅读了MongoDB文档后,我发现这是一个已知问题,这是因为Debian提供的MobogDB软件包无法由Monbodb Inc.维护。
我尝试的第二种方法是来自MongoDB Docs https://www.mongodb.com/docs/manual/manual/tutorial/tutorial/install-mongodb-ongon-debian/-debian/ 这些是来自教程的步骤:
- 使用命令
wget -qo -qo -https://www.mongodb.org/static/static/pgp/server-5.0.asc | sudo apt-key add-
- 使用命令
echo将mongodb存储库添加到apt racuces porices porice coruce coruce coruce coruce coruce coruce coruce poecho“ deb http://repo.mongodb.org/apt/debian buster/debian buster/debian buster/mongodb-org-org/5.0 main” | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
- 运行命令
sudo apt-get update
最后:
Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease
Ign:2 https://repo.mongodb.org/apt/debian focal/mongodb-org/4.4 InRelease
Ign:3 http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 InRelease
Get:4 http://raspbian.raspberrypi.org/raspbian bullseye InRelease [15.0 kB]
Hit:5 https://deb.nodesource.com/node_16.x bullseye InRelease
Err:6 https://repo.mongodb.org/apt/debian focal/mongodb-org/4.4 Release
404 Not Found [IP: 13.226.2.64 443]
Hit:7 http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 Release
Reading package lists... Done
N: Ignoring file 'mongodb-org-4.0.lis' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
E: The repository 'https://repo.mongodb.org/apt/debian focal/mongodb-org/4.4 Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Skipping acquire of configured file 'main/binary-armhf/Packages' as repository 'http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 InRelease' doesn't support architecture 'armhf'
- 最后 - 使用
sudo apt -get install -y mongodb -org
安装mongoDB。
完成所有这些步骤后,我遇到了错误:无法找到软件包mongodb-org 。
我已经看到这个问题以前已经在这里提出,但我在那里没有找到解决方案。 mongodb 4.4/raspberry pi 4
我想获得任何助手或转介人可以帮助我解决这个问题。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我目前有一个Raspberry Pi 4运行Ubuntu-22.04.2,我设法与MongoDB进行了适当的安装。
系统更新:
需要安装libss1.1之前安装mongoDB:
mongoDB:
检查已安装版本:
启动Mongod:
如果启动良好
安装
I currently have a Raspberry pi 4 running Ubuntu-22.04.2 and I managed to get a proper installation with mongodb.
System update :
Required installation of libss1.1 before installing mongodb :
Installing mongodb :
Checking the installed version :
Launch of mongod :
If it is well launched you can block the version of mongodb in 4.4.8 :
End
首先,您需要在Raspberry Pi 4上安装Docker引擎。
以下命令:
创建MongoDB容器PLZ给我您的O/S版本名称在您的PI 4上运行,然后我更新此答案...
无论如何,您可以运行此命令:
尝试此命令64:
PLZ检查此链接:
At the first, you need to install Docker engine on Raspberry Pi 4.
Following commands:
To create MongoDB container plz give me your O/S version name running on your Pi 4 and then I update this answer...
anyway you can run this command:
try this command for arm64:
plz check this link:
https://www.mongodb.com/docs/manual/administration/production-notes/?&_ga=2.245956420.1199726907.1655734879-88534791.1655618178#arm64
您可以在github上找到交叉兼容说明和非官方的杂种binaries 在这里。
You can find cross-compilation instructions and unofficial MongoDB binaries on Github here.
我在Raspberry Pi OS 64位上安装了MongoDB(Raspberry Pi 4型B),该教程:,它对我有用。
如果您有原始的SD卡,则可能有预装的32位Raspberry Pi OS。但是MongoDB没有32位用于ARM架构的软件包,因此您需要安装64位操作系统。我使用了“ Raspberry pi os(64-bit)”( https:///wwwww.raspberrypi。应该基于Debian 11。但是MongoDB没有ARM 64体系结构的Debian Packeges,所以我
在终端中使用了Ubuntu软件包...
I installed MongoDB on Raspberry Pi OS 64-bit (Raspberry Pi 4 model B) by this tutorial: https://linuxhint.com/install-mongodb-raspberry-pi/ and it worked for me.
If you have original SD card, there is probably preinstalled 32-bit Raspberry Pi OS. But MongoDB doesn't have 32bit packages for ARM architecture, so you need to install 64-bit operating system. I used "Raspberry Pi OS (64-bit)" (https://www.raspberrypi.com/software/operating-systems/) which should be based on Debian 11. But MongoDB doesn't have Debian packeges for ARM 64 architecture, so I used Ubuntu package...
In terminal:
这些都不作用。您需要降级openssl libssl。上面的链接不起作用。这是您要做的:
它在raspberrypi 4
。
None of these works. You need to downgrade your openssl libssl. And the link above dont work. Here is what you have to do:
It works on RaspberryPi 4.
MongoDB running on RaspberryPi 4, with Ubuntu 24.04 LTS