运行make
命令会出现此错误。
/usr/bin/ld: cannot find -lexpat collect2: ld returned 1 exit status make: *** [test/serf_get] Error 1
Other logs:- $ld -lexpat --verbose
attempt to open /usr/x86_64-redhat-linux/lib64/libexpat.so failed
attempt to open /usr/x86_64-redhat-linux/lib64/libexpat.a failed
attempt to open /usr/local/lib64/libexpat.so failed
attempt to open /usr/local/lib64/libexpat.a failed
attempt to open /lib64/libexpat.so failed
attempt to open /lib64/libexpat.a fai`enter code here`led
attempt to open /usr/lib64/libexpat.so failed
attempt to open /usr/lib64/libexpat.a failed
attempt to open /usr/x86_64-redhat-linux/lib/libexpat.so failed
attempt to open /usr/x86_64-redhat-linux/lib/libexpat.a failed
attempt to open /usr/lib64/libexpat.so failed
attempt to open /usr/lib64/libexpat.a failed
attempt to open /usr/local/lib/libexpat.so failed
attempt to open /usr/local/lib/libexpat.a failed
attempt to open /lib/libexpat.so failed
attempt to open /lib/libexpat.a failed
attempt to open /usr/lib/libexpat.so failed
attempt to open /usr/lib/libexpat.a failed
ld: cannot find -lexpat
答案1
您需要安装expat-devel
:
yum install expat-devel
这将提供您的构建正在寻找的库。