I read this really good post explaining the library linking me. I would suggest everyone who has encountered a similar problem to read it first.
Therefore, I will help the new user analyze the error message. The problem is that he cannot find the crypto library. Therefore, we need to link this library first.
You add -lcrypto to the LIBS library list. As I understand it. Look at the missing library in the error message /usr/bin/ld: update-cache.o: undefined reference to symbol ' SHA1_Init@ @libcrypto.so.10' . You need to find out the cryptographic part from libcrypto.so.10
LIBS= -lssl -lcrypto
After that, you will get a similar error message:
/usr/bin/ld: update-cache.o: undefined reference to symbol 'deflate' /usr/bin/ld: note: 'deflate' is defined in DSO /lib64/libz.so.1 so try adding it to the linker command line /lib64/libz.so.1: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status
Now you know what to do. Add the -lz library. So finally LIBS looks like below
LIBS= -lssl -lcrypto -lz
The way you solve such linker errors (and compile the first git commit).
Hope this helps :)
source share