Debuginfo

思考とアウトプット

CentOS 64bitでNet::SSLeayが入らない件

Facebook::Graphを入れる途中でNet::SSLeayが入らない。

まじ悩んだ。。

Running Mkbootstrap for Net::SSLeay ()
chmod 644 SSLeay.bs
rm -f blib/arch/auto/Net/SSLeay/SSLeay.so
LD_RUN_PATH="/usr/lib" cc  -shared -O2 -L/usr/local/lib -fstack-protector SSLeay.o  -o blib/arch/auto/Net/SSLeay/SSLeay.so      \
           -L/usr/local/ssl -L/usr/local/ssl/lib -lssl -lcrypto -lz     \
          
/usr/bin/ld: /usr/local/ssl/lib/libssl.a(s3_meth.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/ssl/lib/libssl.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/Net/SSLeay/SSLeay.so] Error 1

調べていたら、WebLogしてくれている方が(涙。ありがとうございます

ニャッキ格闘列伝:http://blog.malrone.info/archives/1063

openssl の最新バージョンをダウンロードしてきて、

$ ./config --shared 
$ make 
# make install

インストールできた! cpanm Facebook::Graphも入った!

追記:

LD_RUN_PATH="/usr/local/ssl/lib:/lib/../lib64" cc  -shared -O2 -L/usr/local/lib -fstack-protector SSLeay.o  -o blib/arch/auto/Net/SSLeay/SSLeay.so      \
           -L/usr/local/ssl -L/usr/local/ssl/lib -lssl -lcrypto -lz     \

/usr/bin/ld: cannot find -lz

こんな感じでFailしたら、zlib-develを入れる。

# yum install zlib-devel