安装 r-base-core 时绕过过多依赖项

安装 r-base-core 时绕过过多依赖项

我正在尝试在 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??)

  1. 我们为什么会有这么多依赖关系?有没有办法轻松查看整个依赖关系树或每个依赖关系背后的动机?
  2. 我真的不关心窗口依赖项(因为它们无法使用)。 有什么好方法可以强制 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...

相关内容