最低限度安装 libvips-dev

最低限度安装 libvips-dev

我想安装libvips-dev软件包。但我认为它有太多的软件包依赖性,例如x11。即使使用--no-install-recommends标志,apt-get 仍然报告它需要获取 69.9 MB 的档案!

有没有办法libvips-dev最小化安装?作为参考,以下是输出:

user@ub:~$ sudo apt-get install libvips-dev --no-install-recommends
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  gettext gir1.2-atk-1.0 gir1.2-freedesktop gir1.2-gdkpixbuf-2.0
  gir1.2-glib-2.0 gir1.2-gtk-2.0 gir1.2-pango-1.0 gir1.2-rsvg-2.0 hdf5-helpers
  libatk1.0-0 libatk1.0-data libatk1.0-dev libbz2-dev libcairo-gobject2
  libcairo-script-interpreter2 libcairo2-dev libcdt5 libcfitsio3-dev
  libcgraph6 libcroco3 libdjvulibre-dev libdjvulibre-text libdjvulibre21
  libelfg0 libexif-dev libexif-gtk-dev libexif-gtk5 libexpat1-dev libfftw3-bin
  libfftw3-dev libfftw3-long3 libfftw3-quad3 libfftw3-single3
  libfontconfig1-dev libfreetype6-dev libgd3 libgdk-pixbuf2.0-dev
  libgirepository-1.0-1 libglib2.0-bin libglib2.0-data libglib2.0-dev
  libgraphviz-dev libgtk2.0-0 libgtk2.0-common libgtk2.0-dev libgvc6 libgvpr2
  libharfbuzz-dev libharfbuzz-gobject0 libharfbuzz-icu0 libhdf5-dev libice-dev
  libice6 libicu52 libilmbase-dev libjasper-dev libjbig-dev libjpeg-dev
  libjpeg-turbo8-dev libjpeg8-dev libjs-jquery liblcms2-dev liblqr-1-0-dev
  libltdl-dev liblzma-dev liblzo2-2 libmagickcore-dev libmagickcore5-extra
  libmagickwand-dev libmagickwand5 libmatio-dev libopenexr-dev
  libopenslide-dev liborc-0.4-dev libpango1.0-dev libpangocairo-1.0-0
  libpangoxft-1.0-0 libpathplan4 libpcre3-dev libpcrecpp0 libpixman-1-dev
  libpng12-dev libpthread-stubs0-dev libpython-all-dev libpython-dev
  libpython2.7-dev librsvg2-2 librsvg2-common librsvg2-dev libsm-dev libsm6
  libtiff5-dev libtiffxx5 libunistring0 libvpx1 libwebp-dev libwebpdemux1
  libwebpmux1 libwmf-dev libx11-dev libxau-dev libxcb-render0-dev
  libxcb-shm0-dev libxcb1-dev libxcomposite-dev libxcomposite1 libxcursor-dev
  libxcursor1 libxdamage-dev libxdamage1 libxdmcp-dev libxdot4 libxext-dev
  libxfixes-dev libxfixes3 libxft-dev libxft2 libxi-dev libxi6 libxinerama-dev
  libxinerama1 libxml2-dev libxml2-utils libxpm4 libxrandr-dev libxrandr2
  libxrender-dev libxt-dev libxt6 pkg-config python-all python-all-dev
  python-dev python2.7-dev shared-mime-info x11-common x11proto-composite-dev
  x11proto-core-dev x11proto-damage-dev x11proto-fixes-dev x11proto-input-dev
  x11proto-kb-dev x11proto-randr-dev x11proto-render-dev x11proto-xext-dev
  x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev zlib1g-dev
Suggested packages:
  gettext-doc libcairo2-doc libgd-tools libglib2.0-doc gvfs libgtk2.0-doc
  libhdf5-doc libice-doc javascript-common libtool-doc liblzma-doc
  liborc-0.4-doc libpango1.0-doc imagemagick librsvg2-bin librsvg2-doc
  libsm-doc nip2 libwmf-doc libxcb-doc libxext-doc libxt-doc
Recommended packages:
  libasprintf-dev libgettextpo-dev hicolor-icon-theme libgtk2.0-bin debhelper
  libtool libvips-doc libvips-tools libx11-doc
The following NEW packages will be installed:
  gettext gir1.2-atk-1.0 gir1.2-freedesktop gir1.2-gdkpixbuf-2.0
  gir1.2-glib-2.0 gir1.2-gtk-2.0 gir1.2-pango-1.0 gir1.2-rsvg-2.0 hdf5-helpers
  libatk1.0-0 libatk1.0-data libatk1.0-dev libbz2-dev libcairo-gobject2
  libcairo-script-interpreter2 libcairo2-dev libcdt5 libcfitsio3-dev
  libcgraph6 libcroco3 libdjvulibre-dev libdjvulibre-text libdjvulibre21
  libelfg0 libexif-dev libexif-gtk-dev libexif-gtk5 libexpat1-dev libfftw3-bin
  libfftw3-dev libfftw3-long3 libfftw3-quad3 libfftw3-single3
  libfontconfig1-dev libfreetype6-dev libgd3 libgdk-pixbuf2.0-dev
  libgirepository-1.0-1 libglib2.0-bin libglib2.0-data libglib2.0-dev
  libgraphviz-dev libgtk2.0-0 libgtk2.0-common libgtk2.0-dev libgvc6 libgvpr2
  libharfbuzz-dev libharfbuzz-gobject0 libharfbuzz-icu0 libhdf5-dev libice-dev
  libice6 libicu52 libilmbase-dev libjasper-dev libjbig-dev libjpeg-dev
  libjpeg-turbo8-dev libjpeg8-dev libjs-jquery liblcms2-dev liblqr-1-0-dev
  libltdl-dev liblzma-dev liblzo2-2 libmagickcore-dev libmagickcore5-extra
  libmagickwand-dev libmagickwand5 libmatio-dev libopenexr-dev
  libopenslide-dev liborc-0.4-dev libpango1.0-dev libpangocairo-1.0-0
  libpangoxft-1.0-0 libpathplan4 libpcre3-dev libpcrecpp0 libpixman-1-dev
  libpng12-dev libpthread-stubs0-dev libpython-all-dev libpython-dev
  libpython2.7-dev librsvg2-2 librsvg2-common librsvg2-dev libsm-dev libsm6
  libtiff5-dev libtiffxx5 libunistring0 libvips-dev libvpx1 libwebp-dev
  libwebpdemux1 libwebpmux1 libwmf-dev libx11-dev libxau-dev
  libxcb-render0-dev libxcb-shm0-dev libxcb1-dev libxcomposite-dev
  libxcomposite1 libxcursor-dev libxcursor1 libxdamage-dev libxdamage1
  libxdmcp-dev libxdot4 libxext-dev libxfixes-dev libxfixes3 libxft-dev
  libxft2 libxi-dev libxi6 libxinerama-dev libxinerama1 libxml2-dev
  libxml2-utils libxpm4 libxrandr-dev libxrandr2 libxrender-dev libxt-dev
  libxt6 pkg-config python-all python-all-dev python-dev python2.7-dev
  shared-mime-info x11-common x11proto-composite-dev x11proto-core-dev
  x11proto-damage-dev x11proto-fixes-dev x11proto-input-dev x11proto-kb-dev
  x11proto-randr-dev x11proto-render-dev x11proto-xext-dev
  x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev zlib1g-dev
0 upgraded, 150 newly installed, 0 to remove and 4 not upgraded.
Need to get 69.9 MB of archives.
After this operation, 243 MB of additional disk space will be used.
Do you want to continue? [Y/n]

答案1

如果您想要一组最小的依赖项,则需要从源代码构建 libvips。这是一个易于构建的包,您可以根据需要删除几乎所有的外部依赖项。例如:

$ ./configure --prefix=/home/john/vips --without-fftw --without-magick --without-orc --without-lcms --without-OpenEXR --without-openslide --without-matio --without-cfitsio --without-libwebp --without-pangoft2 --without-tiff --without-jpeg --without-png --without-libexif --without-gsf
$ make
$ make install
$ ldd ~/vips/bin/vips
    linux-vdso.so.1 => (0x00007fffcfdfe000)
    libvips.so.40 => /home/john/vips/lib/libvips.so.40 (0x00007fa0f432e000)
    libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fa0f40b4000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fa0f3dac000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa0f3b8e000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa0f37c7000)
    libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fa0f35c3000)
    libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007fa0f325d000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa0f2f56000)
    libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fa0f2d4e000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fa0f2b10000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fa0f491e000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa0f290b000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fa0f26f2000)
    liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fa0f24d0000)

答案2

-dev通常相当大,并且libvips-dev依赖于一长串的包。

不幸的是,这些包确实有严格的依赖关系,无法跳过。尝试手动安装相应的.deb文件将是一场真正的噩梦,不要这样做。

如果您确实需要安装,libvips-dev则必须安装其所有依赖项。

http://packages.ubuntu.com/trusty/libvips-dev

相关内容