libcrypto.so.1.0.0: no version information available

openssl-1.0.1p源码安装后,依赖于openssl.so库的应用报错
libcrypto.so.1.0.0: no version information available

解法:
1. 创建 /tmp/openssl.ld,如下:

OPENSSL_1.0.0 {
  global:
  *;
};

OPENSSL_1.0.1 {
  new*;
}OPENSSL_1.0.0;

OPENSSL_1.0.1p {
  new*;
}OPENSSL_1.0.0;

2. 配置openssl加入
./config shared -Wl,--version-script=/tmp/openssl.ld


附:--version-script语法如下:
http://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_25.html

VERS_1.1 {
     global:
         foo1;
     local:
         old*;
         original*;
         new*;
};

VERS_1.2 {
         foo2;
} VERS_1.1;

VERS_2.0 {
         bar1; bar2;
} VERS_1.2;


posted @ 2019-04-25 16:20  mull  阅读(2393)  评论(0编辑  收藏  举报