I have raspberry pi model B. I want to build mongodb on my Linux system and want to copy build onto raspberry pi. I am using mongo-non86 to build mongodb.

I have changed compilers to compile it with arm-linux-gnueabihf-gcc and arm-linux-gnueabihf-g++. But it gives error in between as below.

 build/linux2/normal/third_party/js-1.7/jscpucfg: 1: build/linux2/normal
/third_party/js-1.7/jscpucfg: Syntax error: word unexpected (expecting ")")
 scons: *** [build/linux2/normal/third_party/js-1.7/jsautocfg.h] Error 2

So, my questions are,
1. How to solve this error?
2. Is there any alternate methodology for cross compiling on linux for Raspberry Pi.
3. What is third_party folder and js-1.7 contains (in mongodb build)?
4. Do I have to modify SConstruct file?

Note :- I have already referred this link, but didn't worked.

  • Have you considered installing it this way github.com/RickP/mongopi or c-mobberley.com/wordpress/index.php/2013/10/14/… – Steve Robillard Dec 6 '13 at 2:41
  • I am already following c-mobberley.com/wordpress/index.php/2013/10/14/… for installing mongodb directly on R-Pi. I have tried github.com/RickP/mongopi but getting same error. – Saumya Suhagiya Dec 9 '13 at 8:59
  • Unfortunately, still it is unsolved. Getting work done with compiling stuff once on raspberry pi. Then copy-paste compiled file 'mongod' to raspberry pi. After copy-paste, it requires some housekeeping mentioned in this link. – Saumya Suhagiya Apr 8 '14 at 4:17
  • Compiling software is not really relevant to the Raspberry Pi, it is more OS specific. Please try on Ubuntu Stack. Compilation issues for WindowsIOT will need a new home too – ppumkin Aug 27 '15 at 7:49
  • IMHO atleast two arm based sources for MongoDB is available so definitely I cannot take normal ubuntu version of MongoDB and start compiling. Since, RPi is not having more processing power, easiest way is to cross compile using arm based gcc. FYKI it's working fine if you directly compile on RPI board. – Saumya Suhagiya Aug 27 '15 at 8:15

Arch Linux for Pi has MongoDB v3+ in its repos I believe.

If you are staying with Rasbian, at least Jessie (not sure about Wheezy) has a version too but it is only v2.4

All you need to do is:

sudo apt-get update && sudo apt-get install mongodb

Then edit the config:

sudo nano /etc/mongodb.conf

Make sure you add the external IP address to the bind so it is accessible across your network (assuming you want that).

To check if it is running:

sudo systemctl status mongodb

To restart

sudo systemctl restart mongodb

Those last 2 commands are for Rasbian Jessie. For wheezy it would be:

sudo service mongodb restart

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.