按照官网http://gmssl.org/docs/install.html的提示直接编译:
1 2 3 4 |
./config make make test sudo make install |
然后尝试执行gmssl,报错:
1 2 |
ppm@ppm:~/GmSSL-master$ gmssl gmssl: relocation error: gmssl: symbol BIO_debug_callback version OPENSSL_1_1_0d not defined in file libcrypto.so.1.1 with link time reference |
执行查看gmssl依赖库路径:
1 2 3 4 5 6 7 8 |
root@ppm:/home/ppm/GmSSL-master# ldd /usr/local/bin/gmssl linux-vdso.so.1 (0x00007ffea29f9000) libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007ff6b97e4000) libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007ff6b9319000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff6b90fa000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff6b8d09000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff6b8b05000) /lib64/ld-linux-x86-64.so.2 (0x00007ff6b9d2d000) |
把make得到的两个依赖库拷贝到相应路径:
1 2 3 4 5 6 |
root@ppm:~# cd /home/ppm/GmSSL-master/ root@ppm:/home/ppm/GmSSL-master# ls apps build.info CODE_OF_CONDUCT.md config.com Configurations crypto demos engines external go java libcrypto.a libcrypto.so libssl.a libssl.so LICENSE Makefile.shared openssl.pc php README.md ssl.map tools VMS appveyor.yml certs config configdata.pm Configure crypto.map doc e_os.h fuzz include js libcrypto.pc libcrypto.so.1.1 libssl.pc libssl.so.1.1 Makefile ms os-dep pod2htmd.tmp ssl test util root@ppm:/home/ppm/GmSSL-master# cp libcrypto.so.1.1 /usr/lib/x86_64-linux-gnu/ root@ppm:/home/ppm/GmSSL-master# cp libssl.so.1.1 /usr/lib/x86_64-linux-gnu/ |
转载时请保留出处,违法转载追究到底:进城务工人员小梅 » Ubuntu18.04下gmssl编译