我正在 Ubuntu 12.04 LTS 上安装一个程序。我运行./configure
后没有收到任何错误消息,但当我再次运行时却make
收到错误。请参阅下面的错误信息:
make all-recursive
make[1]: Entering directory `/home/mel/Documents/Software/plinkseq-0.09'
Making all in lib
make[2]: Entering directory `/home/mel/Documents/Software/plinkseq-0.09/lib'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/mel/Documents/Software/plinkseq-0.09/lib'
Making all in client
make[2]: Entering directory `/home/mel/Documents/Software/plinkseq-0.09/client'
/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -lz -ldl -o pseq pseq-skat.o pseq-util.o pseq-ibs.o pseq-main.o pseq-func.o pseq-summaries.o pseq-views.o pseq-assoc.o pseq-genic.o pseq-compare.o pseq-ibd.o pseq-loaders.o pseq-clusters.o pseq-varfunc.o pseq-glm-tests.o pseq-stepup.o pseq-kbac.o pseq-netassoc.o pseq-davies.o pseq-gseq.o pseq-extra.o pseq-cnv.o pseq-chet.o ../lib/libplinkseq.la
libtool: link: g++ -g -O2 -o .libs/pseq pseq-skat.o pseq-util.o pseq-ibs.o pseq-main.o pseq-func.o pseq-summaries.o pseq-views.o pseq-assoc.o pseq-genic.o pseq-compare.o pseq-ibd.o pseq-loaders.o pseq-clusters.o pseq-varfunc.o pseq-glm-tests.o pseq-stepup.o pseq-kbac.o pseq-netassoc.o pseq-davies.o pseq-gseq.o pseq-extra.o pseq-cnv.o pseq-chet.o -ldl ../lib/.libs/libplinkseq.so -lz -lprotobuf
../lib/.libs/libplinkseq.so: undefined reference to `dlopen'
../lib/.libs/libplinkseq.so: undefined reference to `dlclose'
../lib/.libs/libplinkseq.so: undefined reference to `dlerror'
../lib/.libs/libplinkseq.so: undefined reference to `dlsym'
collect2: ld returned 1 exit status
make[2]: *** [pseq] Error 1
make[2]: Leaving directory `/home/mel/Documents/Software/plinkseq-0.09/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mel/Documents/Software/plinkseq-0.09'
make: *** [all] Error 2
我对 Linux 不太熟悉,所以请简单回复。谢谢。
答案1
尝试再次以 身份运行 configure ./configure LDFLAGS=-Wl,--no-as-needed
,然后再次运行make
。它帮助我在 Ubuntu 13.10 上编译 COIN-OR OS,在那里我遇到了完全相同的错误。
[该解决方案的来源]