3

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.

S S
  • 131
  • 6

1 Answers1

1

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
Julian Knight
  • 296
  • 4
  • 7