编译TrueCrypt时,出现“对符号'dlclose @@ GLIBC_2.2.5'的未定义引用”


18

我正在尝试从Ubuntu 13.04上的源代码编译TrueCrypt 7.1a。但是make,在链接过程中失败,并显示以下错误:

Linking truecrypt
/usr/bin/ld: /home/user/truecrypt-7.1a-source/tc2/Volume/Volume.a(SecurityToken.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: note: 'dlclose@@GLIBC_2.2.5' is defined in DSO /lib/x86_64-linux-gnu/libdl.so.2 so try adding it to the linker command line
/lib/x86_64-linux-gnu/libdl.so.2: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[1]: *** [truecrypt] Error 1
make: *** [all] Error 2

我该如何解决?

Answers:


17

将环境变量设置LIBS-ldl

LIBS=-ldl make

3
我有ubuntu 14.04。得到类似的错误 /usr/bin/ld: CMakeFiles/lmdemo.dir/lmdemo.c.o: undefined reference to symbol 'exp@@GLIBC_2.2.5' //lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line您的解决方案没有帮助我。我该怎么办?
Shashwat 2014年

谢谢!2小时让我终于找到了这个。我在Raspbian Raspberry PI平台上遇到了这个问题。
罗斯·罗杰斯
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.