Library Files Not Found When Replacing a Dynamic Library with a Static Library
Symptom
An error is reported when compiling Snappy-java:
1 | [exec] make: *** [target/commons-crypto-1.0.0-Default/libcommons-crypto.so] Error 1 |
Key Process and Cause Analysis
None
Conclusion and Solution
- Solution 1:
- Go to the commons-crypto-CRYPTO-1.0.0 directory.
1cd commons-crypto-CRYPTO-1.0.0
- Add the -Wl,-Bdynamic compilation option of G++ to the Makefile file.
- Go to the commons-crypto-CRYPTO-1.0.0 directory.
- Solution 2:
If you replace the static library with a dynamic library, the library may not be found during the running. You can install the corresponding static library to solve the problem.
Use the yum source to install the required glibc and libstdc++-static.1 2
yum install libstdc++-static.aarch64 -y yum install glibc* -y
Parent topic: Rectifying Faults