GmSSL
GmSSL copied to clipboard
error while loading shared libraries: libgmssl.so.3 cannot open shared object file: No such file or directory
make 成功过一两次,大部分都是不成功的,怎解?
/usr/local/lib 目录下确定存在 libgmssl.so.3 、libgmssl.so.3.0、 libgmssl.so
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/libgmssl.so.3.0
-- Installing: /usr/local/lib/libgmssl.so.3
-- Installing: /usr/local/lib/libgmssl.so
-- Installing: /usr/local/include/gmssl
-- Installing: /usr/local/include/gmssl/sm2.h
-- Installing: /usr/local/include/gmssl/rand.h
-- Installing: /usr/local/include/gmssl/hkdf.h
-- Installing: /usr/local/include/gmssl/x509_crl.h
-- Installing: /usr/local/include/gmssl/skf.h
-- Installing: /usr/local/include/gmssl/mem.h
-- Installing: /usr/local/include/gmssl/chacha20.h
-- Installing: /usr/local/include/gmssl/x509_alg.h
-- Installing: /usr/local/include/gmssl/sm3.h
-- Installing: /usr/local/include/gmssl/des.h
-- Installing: /usr/local/include/gmssl/version.h
-- Installing: /usr/local/include/gmssl/md5.h
-- Installing: /usr/local/include/gmssl/x509_ext.h
-- Installing: /usr/local/include/gmssl/oid.h
-- Installing: /usr/local/include/gmssl/rc4.h
-- Installing: /usr/local/include/gmssl/pem.h
-- Installing: /usr/local/include/gmssl/gcm.h
-- Installing: /usr/local/include/gmssl/hex.h
-- Installing: /usr/local/include/gmssl/aes.h
-- Installing: /usr/local/include/gmssl/sm9.h
-- Installing: /usr/local/include/gmssl/x509_req.h
-- Installing: /usr/local/include/gmssl/rsa.h
-- Installing: /usr/local/include/gmssl/x509_str.h
-- Installing: /usr/local/include/gmssl/x509_oid.h
-- Installing: /usr/local/include/gmssl/zuc.h
-- Installing: /usr/local/include/gmssl/block_cipher.h
-- Installing: /usr/local/include/gmssl/sm4.h
-- Installing: /usr/local/include/gmssl/base64.h
-- Installing: /usr/local/include/gmssl/asn1.h
-- Installing: /usr/local/include/gmssl/cms.h
-- Installing: /usr/local/include/gmssl/tls.h
-- Installing: /usr/local/include/gmssl/digest.h
-- Installing: /usr/local/include/gmssl/ec.h
-- Installing: /usr/local/include/gmssl/sdf.h
-- Installing: /usr/local/include/gmssl/gf128.h
-- Installing: /usr/local/include/gmssl/hash_drbg.h
-- Installing: /usr/local/include/gmssl/hmac.h
-- Installing: /usr/local/include/gmssl/sha3.h
-- Installing: /usr/local/include/gmssl/endian.h
-- Installing: /usr/local/include/gmssl/error.h
-- Installing: /usr/local/include/gmssl/sha2.h
-- Installing: /usr/local/include/gmssl/x509.h
-- Installing: /usr/local/include/gmssl/pbkdf2.h
-- Installing: /usr/local/include/gmssl/sha1.h
-- Installing: /usr/local/include/gmssl/pkcs8.h
-- Installing: /usr/local/bin/gmssl
-- Set runtime path of "/usr/local/bin/gmssl" to ""
root@d21c9e37bf1e:/GmSSL/build# gmssl
gmssl: error while loading shared libraries: libgmssl.so.3: cannot open shared object file: No such file or directory
lib路径的设置问题,如果想要测试gmssl的话可以直接cd到安装路径下用export命令暂时添加lib路径进行测试,如果想要一直可以访问到的话,可以把这些lib文件copy到/usr/lib下,也可以修改/etc/ld.so.conf文件添加相应的路径,然后执行ldconfig命令再进行测试,如果我的意思没有表达清楚的话,可以参考这这个链接https://blog.csdn.net/feikudai8460/article/details/119991974
lib路径的设置问题,如果想要测试gmssl的话可以直接cd到安装路径下用export命令暂时添加lib路径进行测试,如果想要一直可以访问到的话,可以把这些lib文件copy到/usr/lib下,也可以修改/etc/ld.so.conf文件添加相应的路径,然后执行ldconfig命令再进行测试,如果我的意思没有表达清楚的话,可以参考这这个链接https://blog.csdn.net/feikudai8460/article/details/119991974
可以了,感谢!
但是,为什么我曾经成功过几次呢?
lib路径的设置问题,如果想要测试gmssl的话可以直接cd到安装路径下用export命令暂时添加lib路径进行测试,如果想要一直可以访问到的话,可以把这些lib文件copy到/usr/lib下,也可以修改/etc/ld.so.conf文件添加相应的路径,然后执行ldconfig命令再进行测试,如果我的意思没有表达清楚的话,可以参考这这个链接https://blog.csdn.net/feikudai8460/article/details/119991974
可以了,感谢!
但是,为什么我曾经成功过几次呢?
很抱歉,我才疏学浅,这个原因我就不清楚了,需要具体情况具体分析的。
楼上说的什么*玩意
cp /usr/local/lib/libgmssl.so.3 /usr/lib64
[root@localhost lib]# gmssl version
GmSSL 3.0.0
楼上说的什么*玩意
cp /usr/local/lib/libgmssl.so.3 /usr/lib64
[root@localhost lib]# gmssl version GmSSL 3.0.0
楼主看完可以close了
楼主英明,但是为什么他自己生成的路径不直接生成到/usr/lib64这里面呢?还需要我copy一把
ln -s /usr/local/lib/libgmssl.so.3 /usr/lib/libgmssl.so.3
ln -s /usr/local/lib/libgmssl.so.3 /usr/lib64/libgmssl.so.3
做了两个软链, 正确运行了.
希望安装脚本能改一下, 主动把软链接做好.