当前位置: 首页>>技术问答>>正文


如何运行’apt-get install’来安装所有依赖项?

,

问题描述

我在ubuntu服务器安装中运行它:

sudo apt-get install git-core gnupg flex bison gperf build-essential \
  zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
  libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
  libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
  python-markdown libxml2-utils xsltproc zlib1g-dev:i386

但我得到了这个:

Reading package lists...
Building dependency tree...
Reading state information...
curl is already the newest version.
gnupg is already the newest version.
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:
 build-essential : Depends: gcc (>= 4:4.4.3) but it is not going to be installed
                   Depends: g++ (>= 4:4.4.3) but it is not going to be installed
 g++-multilib : Depends: cpp (>= 4:4.7.2-1ubuntu2) but it is not going to be installed
                Depends: gcc-multilib (>= 4:4.7.2-1ubuntu2) but it is not going to be installed
                Depends: g++ (>= 4:4.7.2-1ubuntu2) but it is not going to be installed
                Depends: g++-4.7-multilib (>= 4.7.2-1~) but it is not going to be installed

我怎样才能解决这个问题?

最佳解决方案

sudo apt-get install -f

这将安装您之前安装错过的任何依赖项。我刚刚更正了我的团队查看器和VNC安装程序。

次佳解决方案

试试sudo apt-get build-dep build-essential

第三种解决方案

你以前跑过:$ sudo aptitude update && sudo aptitude full-upgrade吗?

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/6905.html,未经允许,请勿转载。