我正在安装 plib-1.8.0,我解压了 .tar.gz,然后在新解压的文件夹中打开终端,运行此命令:
./configure
并得到这个输出:
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for mawk... mawk
checking whether make sets ${MAKE}... yes
includedir changed to ${prefix}/include/plib libdir is ${exec_prefix}/lib
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for a BSD compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking build system type... x86_64-unknown-linux
checking host system type... x86_64-unknown-linux
checking for X... libraries , headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for pthread_create in -lpthread... no
checking for glNewList in -lGL... no
checking for glNewList in -lMesaGL... no
configure: error: could not find working GL library
我该如何修复它并成功安装 plib-1.8.0
答案1
如果您检查该config.log
文件,您可能会发现glNewList
conftest 并不一定报告其失败的真正原因。以我的情况为例:
configure:6841: checking for glNewList in -lGL
configure:6876: gcc -o conftest -g -O2 conftest.c -lGL -lXi -lXmu -lXext -lX11 -lm >&5
/usr/bin/ld: cannot find -lXmu: No such file or directory
collect2: error: ld returned 1 exit status
configure:6882: $? = 1
因此,您还需要确保您的系统具有各种 X11 开发库 - 我只需要安装,libxmu-dev
因为其他库已经存在,但您可能libxi-dev
也需要(其他库应作为依赖项安装)。
如果磁盘空间不是问题,xorg-dev
元包应该会安装您需要的所有内容,甚至更多。