Updating Mongodb

mongodb

#1

Hi All,

At the moment, Cloud9 comes with MongoDB v2.6.11 installed by default. The following video is a walk-through on how to install the latest version of MongoDB (which is 3.0.10 at the time of writing).

The commands that were executed in the above video:

sudo apt-get remove mongodb-org mongodb-org-server

sudo apt-get autoremove

sudo rm -rf /usr/bin/mongo*

echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list

sudo apt-get update

sudo apt-get install mongodb-org mongodb-org-server

sudo touch /etc/init.d/mongod

sudo apt-get install mongodb-org-server

I hope this helps!

Happy coding!


Mongodb update error
#2

This worked perfectly! Thanks for posting this. Especially the last two steps with the “touch” command, actually really seemed to be necessary to “really” install mongodb completely.

One more remark: The current latest version (as of July 2016) is mongo 3.2.7 You can “force” apt-get to install the latest version with this command (taken from the mongodb docs)

sudo apt-get install -y mongodb-org=3.2.7 mongodb-org-server=3.2.7 mongodb-org-shell=3.2.7 mongodb-org-mongos=3.2.7 mongodb-org-tools=3.2.7


#3

Worked for me, thank you!


#4

I’m getting an error :frowning:

Setting up mongodb-org-server (3.2.12) ...
invoke-rc.d: unknown initscript, /etc/init.d/mongod not found.
dpkg: error processing package mongodb-org-server (--configure):
 subprocess installed post-installation script returned error exit status 100
dpkg: dependency problems prevent configuration of mongodb-org:
 mongodb-org depends on mongodb-org-server; however:
  Package mongodb-org-server is not configured yet.

dpkg: error processing package mongodb-org (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mongodb-org-server
 mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)

#5

I had the same error – but don’t worry about it, just proceed with the steps outlined above by user mutahhir and it will still work (at least, it did for me as of today).


#6

Hello,

I am getting the same error as codemode above. Does anyone have any solutions?


#8

[quote="mutahhir, po:

sudo apt-get remove mongodb-org mongodb-org-server

sudo apt-get autoremove

sudo rm -rf /usr/bin/mongo*

echo “deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse” | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list

sudo apt-get update

sudo apt-get install mongodb-org mongodb-org-server

sudo touch /etc/init.d/mongod

sudo apt-get install mongodb-org-server
امیدوارم کمک کند!

برنامه نویسی مبارک!

8 دوست داشتنیپاسخ

ایجاد شده
مارس '16
آخرین پاسخ
فوریه 1
5
پاسخ ها
3.0k
نمایش ها
6
کاربران
10
دوست دارد
2
لینک ها

3 ماه بعد

doogiemuc
16 ژوئیه
این کاملا کار کرد تشکر برای ارسال این. به خصوص دو مرحله آخر با فرمان “لمس”، واقعا به نظر واقعا لازم بود تا “واقعا” mongodb را به طور کامل نصب کند.

یک نظر دیگر: آخرین نسخه فعلی (تا ژوئیه 2016)، mongo 3.2.7 شما می توانید “apt-get” را برای نصب آخرین نسخه با این دستور (از docs mongodb گرفته شده)

sudo apt-get install -y mongodb-org=3.2.7 mongodb-org-server=3.2.7 mongodb-org-shell=3.2.7 mongodb-org-mongos=3.2.7 mongodb-org-tools=3.2.7

1 دوست داشتنپاسخ
3 ماه بعد

mkayen
16 سپتامبر
Worked for me, thank you!

Reply
5 MONTHS LATER

codemode
Feb '17
I’m getting an error : افتخار:

Setting up mongodb-org-server (3.2.12) …
invoke-rc.d: unknown initscript, /etc/init.d/mongod not found.
dpkg: error processing package mongodb-org-server (–configure):
subprocess installed post-installation script returned error exit status 100
dpkg: dependency problems prevent configuration of mongodb-org:
mongodb-org depends on mongodb-org-server; however:
Package mongodb-org-server is not configured yet.

dpkg: error processing package mongodb-org (–configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mongodb-org-server
mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)
1 LikeReply
10 MONTHS LATER

dosstx
Dec '17
I had the same error – but don’t worry about it, just proceed with the steps outlined above by user mutahhir and it will still work (at least, it did for me as of today).

Reply
1 MONTH LATER

nissacjg
Feb 1
Hello,

I am getting the same error as codemode above. Does anyone have any solutions?

Reply
Bookmark Share Reply
You will be notified if someone mentions your @name or replies to you.

Suggested Topics
Topic Category Replies Activity
Tried Inviting Students… doesn’t work
student education
FAQ
5 Nov '17
C9 IDE does not open on one BBGW but does on the other
Cloud9 Support
1 Apr '17
Fontconfig warning: ignoring C.UTF-8: not a valid language tag
Cloud9 Support
4 Aug '17
Mixed content error
Programming Help
7 Aug '17
How to migrate psql databse from c9 to AWS c9?
rails postgresql database
Cloud9 Support
0 Dec '17


#9

sudo apt-get install -y mongodb org org = 3.2.7 mongodb-org-server = 3.2.7 mongodb-org-shell = 3.2.7 mongodb-org-mongos = 3.2.7 mongodb-org-tools =


#10

indent preformatted text by 4 spaces


#11

I went through all process and checked mongo --version it says : bash: /usr/bin/mongo: No such file or directory