apt remove glob 安裝額外的包
當我試圖用
apt remove *poppler* --autoremove
apt 解除安裝所有東西時,poppler 試圖安裝 34 個新軟體包。為什麼會發生這種情況?輸出:
# apt remove *poppler* Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'zathura-pdf-poppler' for glob '*poppler*' Note, selecting 'ruby-poppler' for glob '*poppler*' Note, selecting 'python2.7-poppler-dbg' for glob '*poppler*' Note, selecting 'poppler-utils' for glob '*poppler*' Note, selecting 'python3-poppler-qt5' for glob '*poppler*' Note, selecting 'libpoppler-cil' for glob '*poppler*' Note, selecting 'libpoppler-dev' for glob '*poppler*' Note, selecting 'python2.7-poppler' for glob '*poppler*' Note, selecting 'libpoppler-qt5-dev' for glob '*poppler*' Note, selecting 'libpoppler-cpp0' for glob '*poppler*' Note, selecting 'monodoc-poppler-manual' for glob '*poppler*' Note, selecting 'libpoppler-qt5-1' for glob '*poppler*' Note, selecting 'libpoppler-cil-dev' for glob '*poppler*' Note, selecting 'libpoppler-glib-dev' for glob '*poppler*' Note, selecting 'libpoppler-glib-doc' for glob '*poppler*' Note, selecting 'libpopplerkit0' for glob '*poppler*' Note, selecting 'qtdeclarative5-poppler-qml-plugin' for glob '*poppler*' Note, selecting 'libpoppler-private-dev' for glob '*poppler*' Note, selecting 'python-poppler-dbg' for glob '*poppler*' Note, selecting 'gir1.2-poppler-0.18' for glob '*poppler*' Note, selecting 'libpoppler-cpp-dev' for glob '*poppler*' Note, selecting 'libpopplerkit-dev' for glob '*poppler*' Note, selecting 'python-poppler' for glob '*poppler*' Note, selecting 'libpoppler-cpp0v5' for glob '*poppler*' Note, selecting 'libpoppler-glib8' for glob '*poppler*' Note, selecting 'libpoppler79' for glob '*poppler*' Note, selecting 'poppler-data' for glob '*poppler*' Note, selecting 'xpoppler-utils' for glob '*poppler*' Note, selecting 'qtdeclarative5-poppler1.0' for glob '*poppler*' Package 'libpoppler-cpp0' is not installed, so not removed Package 'xpoppler-utils' is not installed, so not removed Note, selecting 'python-poppler' instead of 'python2.7-poppler' Note, selecting 'python-poppler-dbg' instead of 'python2.7-poppler-dbg' Note, selecting 'qtdeclarative5-poppler1.0' instead of 'qtdeclarative5-poppler-q ml-plugin' Package 'libpoppler-cil' is not installed, so not removed Package 'libpoppler-cil-dev' is not installed, so not removed Package 'libpopplerkit-dev' is not installed, so not removed Package 'libpopplerkit0' is not installed, so not removed Package 'monodoc-poppler-manual' is not installed, so not removed Package 'python-poppler' is not installed, so not removed Package 'python-poppler-dbg' is not installed, so not removed Package 'python3-poppler-qt5' is not installed, so not removed Package 'qtdeclarative5-poppler1.0' is not installed, so not removed Package 'ruby-poppler' is not installed, so not removed Package 'zathura-pdf-poppler' is not installed, so not removed Package 'libpoppler-cpp-dev' is not installed, so not removed Package 'libpoppler-cpp0v5' is not installed, so not removed Package 'libpoppler-glib-doc' is not installed, so not removed Package 'libpoppler-qt5-dev' is not installed, so not removed The following packages were automatically installed and are no longer required: catdoc cups-ipp-utils fonts-crosextra-caladea fonts-crosextra-carlito fonts-droid-fallback fonts-linuxlibertine fonts-sil-gentium-basic gimp-data hplip-data inkscape-trunk-data libabw-0.1-1 libamd2 libapache-pom-java libbabl-0.1-0 libboost-date-time1.67.0 libboost-locale1.67.0 libboost-thread1.67.0 libbsh-java libcamd2 libccolamd2 libcholmod3 libclucene-contribs1v5 libclucene-core1v5 libcmis-0.5-5v5 libcolamd2 libcommons-logging-java libcommons-parent-java libcupscgi1 libde265-0 libe-book-0.1-1 libemf1 libeot0 libepub0 libepubgen-0.1-1 libetonyek-0.1-1 libexiv2-14 libfontembed1 libfreehand-0.1-1 libgegl-0.4-0 libgegl-common libgexiv2-2 libgimp2.0 libgs9-common libheif1 libhpmud0 libijs-0.35 libjbig2dec0 libmetis5 libmhash2 libmspub-0.1-1 libmwaw-0.3-3 libmypaint-1.3-0 libmypaint-common libmythes-1.2-0 libneon27-gnutls libodfgen-0.1-1 liborcus-0.13-0 libpagemaker-0.0-0 libplot2c2 libpstoedit0c2a libqpdf21 libraptor2-0 librasqal3 libraw16 librdf0 libreoffice-java-common libsane-hpaio libsuitesparseconfig5 libtumbler-1-0 libumfpack5 libwps-0.4-4 libxmlsec1 libxmlsec1-nss libyajl2 lp-solve python-scour python3-olefile python3-pexpect python3-pil python3-ptyprocess python3-renderpm python3-reportlab python3-reportlab-accel python3-scour qpdf scour tumbler-common Use 'apt autoremove' to remove them. The following additional packages will be installed: colord colord-data foomatic-filters libbsd0:i386 libcairo2:i386 libcolorhug2 libexpat1:i386 libfontconfig1:i386 libfreetype6:i386 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 liblcms2-2:i386 liblzma5:i386 libnspr4:i386 libnss3:i386 libpaps0 libpixman-1-0:i386 libpng16-16:i386 libpoppler79:i386 libsqlite3-0:i386 libtiff5:i386 libuuid1:i386 libx11-6:i386 libxau6:i386 libxcb-render0:i386 libxcb-shm0:i386 libxcb1:i386 libxdmcp6:i386 libxext6:i386 libxrender1:i386 paps poppler-utils:i386 zlib1g:i386 Suggested packages: colord-sensor-argyll Recommended packages: ghostscript poppler-data:i386 The following packages will be REMOVED: bluez-cups cups cups-core-drivers cups-filters cups-filters-core-drivers cups-x2go fig2dev ghostscript ghostscript-x gimp gir1.2-poppler-0.18 hplip inkscape-trunk libgs9 libkf5filemetadata-bin libpoppler-dev libpoppler-glib-dev libpoppler-glib8 libpoppler-private-dev libpoppler-qt5-1 libpoppler79 libreoffice libreoffice-avmedia-backend-gstreamer libreoffice-base libreoffice-base-core libreoffice-base-drivers libreoffice-calc libreoffice-core libreoffice-draw libreoffice-impress libreoffice-librelogo libreoffice-math libreoffice-nlpsolver libreoffice-ogltrans libreoffice-report-builder libreoffice-report-builder-bin libreoffice-script-provider-bsh libreoffice-script-provider-js libreoffice-script-provider-python libreoffice-sdbc-postgresql libreoffice-wiki-publisher libreoffice-writer poppler-data poppler-utils printer-driver-hpcups printer-driver-pnm2ppa printer-driver-postscript-hp printer-driver-ptouch printer-driver-pxljr printer-driver-sag-gdi printer-driver-splix pstoedit python3-uno tumbler xubuntu-core The following NEW packages will be installed: colord colord-data foomatic-filters libbsd0:i386 libcairo2:i386 libcolorhug2 libexpat1:i386 libfontconfig1:i386 libfreetype6:i386 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 liblcms2-2:i386 liblzma5:i386 libnspr4:i386 libnss3:i386 libpaps0 libpixman-1-0:i386 libpng16-16:i386 libpoppler79:i386 libsqlite3-0:i386 libtiff5:i386 libuuid1:i386 libx11-6:i386 libxau6:i386 libxcb-render0:i386 libxcb-shm0:i386 libxcb1:i386 libxdmcp6:i386 libxext6:i386 libxrender1:i386 paps poppler-utils:i386 zlib1g:i386 0 upgraded, 34 newly installed, 55 to remove and 0 not upgraded. Need to get 7,361 kB of archives. After this operation, 312 MB disk space will be freed. Do you want to continue? [Y/n]
在預設的 Ubuntu 桌面安裝中有很多依賴
libpoppler
或poppler-utils
(直接或間接)的軟體包。刪除
popple-utils
意味著刪除cups-filter
取決於它的內容。
printer-driver-foo2zjs
依賴於cups-filters | foomatic-filters
所以只要你安裝它就可以保留它foomatic-filters
不依賴於poppler-utils
.
poppler-utils
recommandscolord
並且您可能已將 apt 配置為自動安裝recommands(預設情況下)。它還建議poppler-utils
。您已要求刪除該poppler-utils
軟體包,但仍可以安裝它的 i386 版本。最後,
apt
盡量滿足您的要求,同時盡量減少損壞(要刪除的其他軟體包的數量),但在這種情況下,它會導致次優選擇,因為您最終安裝了相同的軟體包,但安裝在外部架構中。還有許多其他可能的替代方法來解決這些依賴問題。
我個人總是使用
aptitude
包管理,因為它讓我可以選擇如何解決依賴衝突。在
aptitude
中,我將預設視圖設置為平面(在選項 -> 首選項中,還勾選“前進到下一個條目”選項),然後您可以更輕鬆地過濾包。例如,通過按l
(小寫L
)限制視圖,然後輸入~i poppler
,您將獲得名稱包含的已安裝包的列表poppler
。然後,您可以解除安裝 (
-
) 或清除 (_
) 每個包,當您這樣做時,您會注意到aptitude
標記衝突(並且某些包可能會變成紅色)。然後,您可以檢查衝突 (e
) 並在許多可能的解決方案中進行選擇。您還可以通過批准或拒絕個人選擇來影響解決方案(例如刪除該軟體包,安裝該軟體包……)。另請注意,
*poppler*
您的 inapt remove *poppler* --autoremove
應該已被引用。*poppler*
是一個外殼球。例如,如果目前目錄中有一個popplering
文件,它會被 shell 擴展,所以你最終會執行apt remove popplering --autoremove
.像 csh、tcsh、fish、zsh(或
bash -O failglob
)這樣的 shell 會通過報告錯誤讓您意識到自己的No match
錯誤。