Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

64 bit Linux/Ubuntu and openssl issue (could not read symbols: Bad value)

Normally I search a lot and read a lot to fix my issues, but for this particular problem, it has been pretty unproductive.

I am running a 64bit Ubuntu Linux server on which I installed LAMP stack, and had problem with libcurl not having SSL support, while the OS binary does have SSL support. The PHP just cannot read it. When I searched for solutions and tried doing the following to enable ssl support while installing PHP, I got the problem..

./configure .... --with-openssl
...
....
/usr/bin/ld: ext/standard/.libs/info.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
ext/standard/.libs/info.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [libphp5.la] Error 1

So, it quit suddenly. I tried doing --enable-shared --without-pic arguments to no avail.

like image 483
Vijay Kumar Kanta Avatar asked Aug 07 '13 08:08

Vijay Kumar Kanta


1 Answers

Okay, sorry for not search properly in SO itself. One of the related topics had an answer to this problem. relocation R_X86_64_32 against a local symbol' error

All I had to do was do a fresh install of openssl this time with enable-shared option during configure

./config enable-shared

Then I had to do a fresh install of cURL

./configure --with-ssl=/usr/local/ssl --with-zlib

Then I had to do a fresh install of PHP

./configure .... --with-openssl --with-curl ....

..and that did it. The PHP cURL extension has SSL support.

like image 184
Vijay Kumar Kanta Avatar answered Sep 23 '22 00:09

Vijay Kumar Kanta