2

I'm trying to install a php extension that is written in c and make use of MongoDB c driver.

I have been trying for the last 2 days to compile and install the extension, however, I'm getting the same error.

 /usr/bin/ld: /usr/local/lib/libmongoc.a(bson.o): relocation R_X86_64_32S against `bson_numstrs' can not be used when making a shared object; recompile with -fPIC
    /usr/local/lib/libmongoc.a: could not read symbols: Bad value
    collect2: ld returned 1 exit status
    make: *** [thaps.la] Error 1

The full log can be found at pastbin: http://pastebin.com/iqpqHYpm

The extension I'm trying to install is at bitbucket: https://bitbucket.org/heinep/thaps

I'm using php 5.4 with zend 2.4 apache 2.2 MongoDB c driver v0.5 ubuntu 12.04 64bits

1
  • Just a compiling error not server related issue
    – msoro
    Oct 9, 2012 at 10:41

1 Answer 1

1

You'll need to install the MongoDB server, not the driver. Also install the mongodb-dev package, as additional development headers/files may be needed. If you need additional help; documents at mongodb.org offer detailed instructions for installing on Ubuntu & PHP driver.

sh ~> sudo apt-get install mongodb-server mongodb-dev
sh ~> sudo pecl install mongo

php5-mongo is also available through Ubuntu's package manager.

sh ~> sudo apt-get install php5-mongo
0

You must log in to answer this question.