我正在嘗試在 ubuntu 10.10 伺服器上安裝 R(透過 r-base-core)。
它正在嘗試安裝以下所有內容:
The following NEW packages will be installed:
apt-xapian-index apturl apturl-common aspell aspell-en dbus-x11 dictionaries-common docbook-xml dosfstools dpatch firefox firefox-branding fuse-utils gamin gconf2 gconf2-common ghostscript gir1.0-glib-2.0 gksu
gnome-icon-theme gnome-keyring gnome-mime-data gvfs gvfs-backends hdparm hunspell-en-us indicator-application iso-codes launchpad-integration libappindicator1 libart-2.0-2 libaspell15 libatasmart4
libavahi-glib1 libbluetooth3 libbonobo2-0 libbonobo2-common libbonoboui2-0 libbonoboui2-common libbz2-dev libcairo-perl libcanberra0 libcdio-cdda0 libcdio-paranoia0 libcdio10 libcupsimage2 libdbusmenu-glib1
libdbusmenu-gtk1 libenchant1c2a libept1 libexif12 libffi5 libfuse2 libgail18 libgamin0 libgconf2-4 libgcr0 libgdu0 libgirepository1.0-1 libgksu2-0 libglade2-0 libglib-perl libgnome-keyring0 libgnome2-0
libgnome2-canvas-perl libgnome2-common libgnome2-perl libgnome2-vfs-perl libgnomecanvas2-0 libgnomecanvas2-common libgnomeui-0 libgnomeui-common libgnomevfs2-0 libgnomevfs2-common libgnomevfs2-extra libgp11-0
libgphoto2-2 libgphoto2-port0 libgs8 libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 libgtk2-perl libgtop2-7 libgtop2-common libgudev-1.0-0 libgvfscommon0 libhunspell-1.2-0 libidl0 libimobiledevice1
libindicator1 libjson-glib-1.0-0 liblaunchpad-integration1 liblcms1 liblqr-1-0 libmagickcore3 libmagickwand3 libncurses5-dev libnspr4-0d libnss3-1d libntfs-3g79 libntfs10 libopenobex1 liborbit2
libpam-gnome-keyring libpango-perl libpaper-utils libpaper1 libparted0debian1 libpcre3-dev libpcrecpp0 libplist1 libpolkit-agent-1-0 libpolkit-backend-1-0 libproxy0 librarian0 libreadline-dev libreadline6-dev
librsvg2-2 librsvg2-common libsgutils2-2 libsmbclient libsoup-gnome2.4-1 libsoup2.4-1 libstartup-notification0 libtdb1 libusbmuxd1 libutempter0 libvorbisfile3 libvte-common libvte9 libwbclient0 libwebkit-1.0-2
libwebkit-1.0-common libxapian15 libxaw7 libxcb-atom1 libxcb-aux0 libxcb-event1 libxmu6 libxmuu1 libxpm4 libxss1 libxv1 libxxf86dga1 mtools ntfs-3g ntfsprogs obex-data-server patchutils policykit-1
policykit-1-gnome powermgmt-base psmisc python-apt python-cairo python-dbus python-debian python-glade2 python-gnupginterface python-gobject python-gobject-cairo python-gtk2 python-software-properties
python-vte python-webkit python-xapian r-base-core r-base-dev r-cran-boot r-cran-class r-cran-cluster r-cran-codetools r-cran-foreign r-cran-kernsmooth r-cran-lattice r-cran-mass r-cran-matrix r-cran-mgcv
r-cran-nlme r-cran-nnet r-cran-rpart r-cran-spatial r-cran-survival r-doc-html r-recommended rarian-compat sgml-data software-properties-gtk synaptic tcl8.5 tk8.5 ubufox udisks unattended-upgrades unzip
usbmuxd x11-utils x11-xserver-utils xauth xbitmaps xdg-utils xterm xul-ext-ubufox zip
0 upgraded, 204 newly installed, 0 to remove and 0 not upgraded.
Need to get 94.5MB of archives.
After this operation, 284MB of additional disk space will be used.
我的基礎設施空間有限,我不想浪費太多時間來安裝永遠無法在伺服器上使用的程式/庫(libgnome?firefox??)
- 為什麼我們會有所有這些依賴關係?有沒有一種方法可以輕鬆查看整個依賴樹或每個依賴樹背後的動機?
- 我真的不關心視窗依賴項(因為它們不能使用)。有什麼好方法強制 apt/dpkg 忽略它們 --- 或建議從原始碼編譯?
答案1
(2)嘗試
sudo apt-get --no-install-recommends install r-base-core
Ubuntu 預設不僅安裝依靠,而且還受到推崇的包。
(1) 如果您對套件解析樹感興趣,請執行類似的操作
apt-get --dry-run -o Debug::pkgDepCache::AutoInstall=yes install r-base-core
樣本輸出
$ apt-get --dry-run -o Debug::pkgDepCache::AutoInstall=yes install r-base-core
NOTE: This is only a simulation!
apt-get needs root privileges for real execution.
Keep also in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
Installing libblas3gf as Depends of r-base-core
Installing libgfortran3 as Depends of libblas3gf
Installing liblapack3gf as Depends of r-base-core
Installing tcl8.5 as Depends of r-base-core
Installing tk8.5 as Depends of r-base-core
Installing r-recommended as Recommends of r-base-core
Installing r-cran-boot as Depends of r-recommended
Installing r-cran-cluster as Depends of r-recommended
Installing r-cran-foreign as Depends of r-recommended
Installing r-cran-kernsmooth as Depends of r-recommended
Installing r-cran-mass as Depends of r-cran-kernsmooth
# etc...