make: *** 未指定目標且未找到 makefile。停止。怎麼修? (

make: *** 未指定目標且未找到 makefile。停止。怎麼修? (

我正在安裝 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文件,您可能會發現glNewListconftest 不一定會報告其失敗的真正原因。以我為例:

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元包應該安裝您需要的所有內容以及更多內容。

相關內容