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


安装建议/推荐的套餐?

,

问题描述

我运行了以下代码并得到了这个包需要这些包,现在它也说这些包是建议的,建议使用这些包。我如何获得这些安装。

myusuf3@purple:/etc$ sudo apt-get install virtualbox-4.0 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  acroread ia32-libs lib32asound2 lib32bz2-1.0 lib32gcc1 lib32ncurses5 lib32stdc++6 lib32v4l-0 lib32z1 libaudio2
  libc6-i386 libcurl3 libflac8 libhal1 liblcms1 libmng1 libogg0 libpulse0 libqt4-dbus libqt4-network libqt4-opengl
  libqt4-xml libqtcore4 libqtgui4 libsdl-ttf2.0-0 libsdl1.2debian libsdl1.2debian-alsa libsndfile1 libv4l-0
  libvorbis0a libvorbisenc2 libx11-xcb1 nspluginwrapper
Suggested packages:
  libldap2 libgnome-speech7 lib32asound2-plugins nas liblcms-utils pulseaudio qt4-qtconfig
Recommended packages:
  pdf-viewer
The following NEW packages will be installed:
  acroread ia32-libs lib32asound2 lib32bz2-1.0 lib32gcc1 lib32ncurses5 lib32stdc++6 lib32v4l-0 lib32z1 libaudio2
  libc6-i386 libcurl3 libflac8 libhal1 liblcms1 libmng1 libogg0 libpulse0 libqt4-dbus libqt4-network libqt4-opengl
  libqt4-xml libqtcore4 libqtgui4 libsdl-ttf2.0-0 libsdl1.2debian libsdl1.2debian-alsa libsndfile1 libv4l-0
  libvorbis0a libvorbisenc2 libx11-xcb1 nspluginwrapper virtualbox-4.0
0 upgraded, 34 newly installed, 0 to remove and 26 not upgraded.
Need to get 168MB of archives.
After this operation, 460MB of additional disk space will be used.

谢谢,麻烦您了

最佳解决方法

推荐是默认安装的(因为Lucid)。要对特定包进行否定,请使用apt-get --no-install-recommends install pkg。但是,建议不是。您可以使用apt-get -o APT::Install-Suggests="true" install pkg为单个软件包安装安装建议。

没有建议安装conky:

laney@iota> sudo apt-get install conky
[...]
Suggested packages:
  apcupsd moc mpd
The following NEW packages will be installed
  conky conky-all

……或与建议:

laney@iota> sudo apt-get -o APT::Install-Suggests="true" install conky
[...]
The following NEW packages will be installed
  apache2 apache2-doc apache2-mpm-worker apache2-suexec apache2-utils apache2.2-bin apache2.2-common apcupsd apcupsd-cgi apcupsd-doc ario ario-common conky
  conky-all icecast2 ices2 libao-common libao4 libaprutil1-dbd-sqlite3 libaprutil1-ldap libcue1 libmpdclient2 libresid-builder0c2a libsidplay2 libsidutils0
  moc moc-ffmpeg-plugin mpd

您可以通过put将其设置为默认行为

APT::Install-Suggests "true"

/etc/apt/apt.conf.d/的文件中,例如/etc/apt/apt.conf.d/30install-suggests

次佳解决方法

对于建议的包,您只需使用--install-suggests标志:

Consider suggested packages as a dependency for installing.
Configuration Item: APT::Install-Suggests.

而不是传递选项-o APT::Install-Suggests="true" [就像你有--install-recommends]

例:

sudo apt-get --install-suggests install mercurial

第三种解决方法

将选项--install-recommends添加到您的命令:

sudo apt-get --install-recommends install virtualbox-4.0 

参考资料

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