依赖项无法安装

依赖项无法安装

我正在尝试使用以下命令安装程序:

~/Downloads$ sudo apt install  ./argos3_simulator-3.0.0-i686-beta52.deb

我收到的响应(错误)是:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'argos3_simulator:i386' instead of './argos3_simulator-3.0.0-i686-beta52.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 argos3_simulator:i386 : Depends: gcc:i386 (>= 4.2) but it is not installable
                         Depends: g++:i386 (>= 4.2) but it is not installable
                         Depends: cmake:i386 (>= 2.6) but it is not installable
                         Depends: freeglut3-dev:i386 (>= 2.6.0) but it is not installable
                         Depends: qt5-default:i386 (>= 5.5.1) but it is not installable
                         Depends: libxi-dev:i386 but it is not installable
                         Depends: libxmu-dev:i386 but it is not installable
                         Depends: libfreeimage-dev:i386 (>= 3.15) but it is not installable
                         Depends: libfreeimageplus-dev:i386 (>= 3.15) but it is not installable
                         Depends: liblua5.2-dev:i386 but it is not installable
                         Depends: lua5.2:i386 but it is not installable
E: Unable to correct problems, you have held broken packages.

我遵循了很多论坛建议,例如:使用 synaptic,确保安装了 gcc 和 g++,并尝试重新安装它们。其余的我在 synaptic 中找不到。但是我仍然收到错误。

非常感谢您的帮助,请注意我不是 Ubuntu/Linux 高手!(这可能很明显!)

答案1

首先安装我使用的 deb 文件

sudo dpkg -i  some-file.deb

所以你的情况是这样的

sudo dpkg -i    ./argos3_simulator-3.0.0-i686-beta52.deb

然而看起来 deb 想要的是 32 位库而不是普通的 64 位库,所以给自己

dpkg --print-foreign-architectures  # show what you currently have

sudo dpkg --add-architecture i386   # make your machine 32 bit savvy

最重要的是提升你的机器,使它成为一个开发箱,带有一套基本的工具来编译代码等问题

sudo apt-get install  build-essential

现在终于重新发出你的原始命令

sudo dpkg -i    ./argos3_simulator-3.0.0-i686-beta52.deb

如果仍然显示类似的错误,只需使用(在错误消息中使用缺少的库进行更新)安装它们:[然后再次重新发出原始命令]

sudo apt-get install libfreeimageplus-dev:i386

更新 我尝试使用上述方法,看起来预编译的二进制文件正在使用过时的库,因此下面将从源代码进行编译(在 64 位 Ubuntu 16.04 上)

https://github.com/ilpincy/argos3

sudo apt-get install cmake libfreeimage-dev libfreeimageplus-dev  qt5-default freeglut3-dev libxi-dev libxmu-dev liblua5.2-dev lua5.2 doxygen graphviz graphviz-dev asciidoc

下载源代码,然后编译并安装,操作如下:

git clone [email protected]:ilpincy/argos3.git


cd argos3
mkdir build_simulator
cd build_simulator
cmake ../src
make 
make doc
sudo make install
sudo ldconfig 

我可以确认以上运行正常...忽略

[WARNING] Error opening directory "/home/scott/src/github.com/ilpincy/argos3/build_simulator/plugins/simulator/physics_engines/physx/": No such file or directory

然后发出此命令即可查看帮助

argos3 --help

答案2

从您发布的日志来看,它安装argos3_simulator:i386在您的某个 repo(包源)中,而不是您要安装的 deb 文件中。安装gdebi并使用:

$ sudo apt install gdebi
$ sudo gdebi ./argos3_simulator-3.0.0-i686-beta52.deb

希望 gdebi 能帮你完成依赖。不过当然,也许你的 repos 有问题,正如 Michael Haken 所说。

相关内容