'devtoolset-9 can not find -lgmp, -lpthread, how can I set it?
I have tried "locate" the lost *.so, they do exist in the system. Why can not find?
locate gmp.so
# output
/usr/lib64/libgmp.so
/usr/lib64/libgmp.so.10
/usr/lib64/libgmp.so.10.2.0
/usr/lib64/fipscheck/libgmp.so.10.2.0.hmac
/usr/lib64/fipscheck/libgmp.so.10.hmac
/usr/lib64/openssl/engines/libgmp.so
/usr/lib64/openssl098e/engines/libgmp.so
/usr/local/gmp-4.3.2/lib/libgmp.so
/usr/local/gmp-4.3.2/lib/libgmp.so.3
/usr/local/gmp-4.3.2/lib/libgmp.so.3.5.2
The following is the output when I compile the code.
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: 找不到 -lz
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: 找不到 -lgmp
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: 找不到 -lm
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: 找不到 -lpthread
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: 找不到 -lc
"找不到" means "can not find".
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
