I am trying to run a MongoDB server with a node.js server and express on a Raspberry Pi 4. I have installed the MongoDB server using sudo apt-get install mongodb. When I try to start the node server I get the following error.
MongoNetworkError: failed to connect to server [localhost:27017] on first connect [MongoError: Server at localhost:27017 reports maximum wire version 0, but this version of the Node.js Driver requires at least 2 (MongoDB 2.6)]
I have read that it is because of the MongoDB version which is db version v2.4.14. I have tried updating by removing the old mongodb and following instructions at https://hevodata.com/blog/install-mongodb-on-ubuntu/ and doing sudo apt-get install -y mongodb-org, however I then get this error on the terminal:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mongodb-org
As my best known,
mongodb 4 need to run on 64-bit Linux.
If you are using Raspbian or similar OS installed by noobs,
it should be all in 32-bit.
You can only use some old version of mongodb (latest version of mongodb 32 bit is 3.2),
or
you can try to install some 64-bit Linux on your own.
You can try the method on this website.
https://andyfelong.com/2019/03/mongodb-4-0-6-64-bit-on-raspberry-pi-3/
Related
I cant figure out how to install mongodb on ubuntu server running on pi 4 because the official documentation is outdated and all tutorials are telling me to add the key and the update but that doesnt work.
I am trying to achieve a database dump using this command:
mongodump --uri
mongodb+srv://ACC_NAME:PASSWORD#cluster0.fklgt.mongodb.net/DATABASE_NAME
But, I keep getting this error:
Error parsing command line: unrecognised option '--uri'
CONTEXT:
I have done this several times before on my local machine. And now I am attempting to do this on a VPS where I am installing mongodb from scratch.
I tried installing it following the official documentation until I reached this step:
sudo apt-get install -y mongodb-org
Which throws this error:
E: Unable to locate package mongodb-org
After doing some research, I have found this stackoverflow question where most answers say that I should just:
At first try with this command: sudo apt-get install -y mongodb
This is the unofficial mongodb package provided by Ubuntu and it is
not maintained by MongoDB and conflict with MongoDB’s offically
supported packages.
So I did exactly that, and the rest is what I explained earlier in this post.
mongo --version
MongoDB shell version: 2.6.10
mongod --version
db version v2.6.10
hostnamectl
Operating System: Ubuntu 16.04.7 LTS
Kernel: Linux 4.4.0-210-generic
Architecture: x86-64
I try installing mongodb with the following commands:
sudo apt update
sudo apt upgrade
sudo apt install mongodb
However I get the following error:
Package mongodb 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' has no installation candidate
I want to install this on a Linux dev board which has an armv71 cpu, how would I fix it.
Keyserver not available error.
I am trying to install MongoDB on my system. I try to follow the steps given in the following website - Click Here
I am getting the 'keyserver not available' error as given in the image above due to which I am not able to install MongoDB on my Ubuntu 18.04 LTS.
Always try to refer the official documentation for these purposes. The article you have linked is an outdated one and it's actually trying to install xenial version on Bionice beaver, which can be done but not recommended.
Use the below offical mongodb documentation to install the MongoDB community version on your Ubuntu 18.04 machine.
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
I have a RHEL 5.9 (64 bit) installation which is running Postgresql 9.1x database server. I need to upgrade to Postgresql 9.3 and also install PostGIS database extensions. I have looked at this one: http://www.postgresonline.com/journal/archives/329-An-almost-idiots-guide-to-install-PostgreSQL-9.3,-PostGIS-2.1-and-pgRouting-with-Yum.html
and looks like I am going to need: http://yum.postgresql.org/9.3/redhat/rhel-5-x86_64/pgdg-redhat93-9.3-1.noarch.rpm to install pg 9.3 and then do: sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm to install some packages and finally: sudo yum install postgis2_93 to install PostGIS.
While all this sounds good I need to figure out how to upgrade to 9.3 first. I thought I could try running pg_upgrade but it said command not found. I also think I have will have to add the yum.postgresql.org location to some file to enable the rpm download.
Am I on right track? Note, there is no actual database being used on the server and so either a fresh install or an upgrade will do.
**update: Problem is that I can't install any software. Please see this **: https://www.google.com/#q=yum+object+is+not+callable
Thanks!
Meengla
I actually have two RHEL servers. One of them I was/is facing the problem related to the Question and that problem could not fixed until I resolve the 'yum error: TypeError: 'NoneType' object is not callable' problem whenever I try to install any updates. For that I will ask a separate question, probably on SuperUser.
Now, on the other server too I needed to upgrade from Postgresql 9.1 to 9.3 but that server did not have the yum error. And I successfully upgraded that server by downloading 9.3 and installing it as a separate instance and made the 9.1 instance to listen to some other port than 5432. So now 9.3 is working fine and I going to figure out how to completely remove 9.1 from the system.
Thanks.