尝试安装 plib-1.8.5 时出现 make: ***没有规则来创建目标“安装”。

尝试安装 plib-1.8.5 时出现 make: ***没有规则来创建目标“安装”。

首先,我想说我是 Ubuntu 和 Linux 的新手。sudo make install按照说明安装 plib-1.8.5 时出现错误。(仅供参考 1. 这是 Ubuntu 18.04 LTS。之前没有做过任何工作。2. 我应该通过 gym_torcs 为 TORCS 模拟器构建一个环境。)

***No rule to make target 'install'. Stop.

我仔细检查了执行的目录,从出现此错误之前的结果中,我可以找到以下消息。我遗漏了什么?

任何帮助都将不胜感激。提前感谢您的帮助。

使用的脚本

sudo apt-get install git cmake build-essential libmicrohttpd-dev libssl-dev libhwloc-dev

git clone https://github.com/ugo-nama-kun/gym_torcs
cd gym_torcs

sudo apt-get install xautomation python3-pip
pip3 install gym
pip3 install numpy

cd vtorcs-RL-color

tar xzf plib-1.8.5.tar.gz 
cd plib-1.8.5 
./configure CFLAGS="-O2 -m64 -fPIC" CPPFLAGS="-O2 -fPIC" CXXFLAGS="-O2 -fPIC" LDFLAGS="-L/usr/lib64"

我收到的信息

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
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 file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
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-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for X... no
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

下一个使用的脚本

sudo make install

错误信息

***No rule to make target 'install'. Stop.

答案1

在我看来,你做了一些不必要的事情。Ubuntu 存储库中有所有内容可移植性库-检查 packages.ubuntu.com 上的搜索

可移植性库:开发包在所有 Ubuntu 版本中均可用,并且命名为libplib-dev

您可以使用以下方式安装:

sudo apt install libplib-dev

结果您将获得相同的版本 1.8.5。
安装后,您应该按照说明进行操作。


因此,您应该始终使用搜索https://packages.ubuntu.com在您自己编译内容之前。


如果您确实需要自己编译库,那么请阅读下面的文字。
正如@AtomiX84所写,你应该确保它./configure完成时没有错误。这是一个全面的脚本,它检查系统中所有需要的构建工具(编译器、链接器等)和构建依赖项(头文件和库)。APT
可以在这里帮助你——它有特殊的命令来获取构建依赖项
sudo apt-get build-dep libplib-dev,运行此命令后./configure脚本不会失败。

相关内容