天问

apt-get install 引发的悲剧

Linux是一个比较危险的操作系统,比如你想通过apt-get安装一个软件:libxcb1。那么你会执行:

apt-get install libxcb1:i386

或者你会闭上眼睛执行:

apt-get install -y libxcb1:i386

当你成功安装libxcb1这个linux工具后,系统也就崩溃了!这是怎么回事呢:

xx@xx-ubuntu18:~$ sudo apt install libxcb1:i386
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
下列软件包是自动安装的并且现在不需要了:
  apache2-bin bolt bubblewrap gir1.2-goa-1.0 gir1.2-snapd-1
  gir1.2-totemplparser-1.0 gnome-keyring-pkcs11 gnome-themes-extra-data
  gnome-todo-common i965-va-driver liba52-0.7.4 libaacs0 libapache2-mod-dnssd
  libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libaribb24-0
  libass9 libbasicusageenvironment1 libbdplus0 libbluray2
  libboost-iostreams1.65.1 libboost-locale1.65.1 libbrotli1 libcddb2
  libcdio-cdda2 libcdio-paranoia2 libcdio17 libcrystalhd3 libdc1394-22 libdca0
  libdouble-conversion1 libdvbpsi10 libdvdnav4 libdvdread4 libebml4v5
  libepubgen-0.1-1 libfaad2 libfcitx-gclient1 libfwupd2
  libglib-object-introspection-perl libgme0 libgnome-todo libgraphene-1.0-0
  libgroupsock8 libgsm1 libgsoap-2.8.60 libkate1 liblivemedia62 libmad0
  libmatroska6v5 libmicrodns0 libmng2 libmp3lame0 libmpcdec6 libmpeg2-4
  libmpg123-0 libmuparser2v5 libmysqlclient20 libnfs11 libopencc2
  libopencc2-data libopenjp2-7 libopenmpt-modplug1 libopenmpt0 liborcus-0.13-0
  libpinyin-data libpinyin13 libplacebo4 libpoppler73 libproxy-tools
  libqt4-dbus libqt4-network libqt4-script libqt4-sql libqt4-sql-mysql
  libqt4-xml libqt4-xmlpatterns libqt5concurrent5 libqt5core5a libqt5dbus5
  libqt5network5 libqt5qml5 libqt5sql5 libqt5sql5-sqlite libqtcore4 libqtdbus4
  libreoffice-l10n-en-gb libresid-builder0c2a libshine3 libsidplay2
  libsnappy1v5 libsodium23 libsoxr0 libssh-gcrypt-4 libssh2-1 libsysmetrics1
  libtwolame0 libupnp6 libusageenvironment3 libva-drm2 libva-wayland2 libva2
  libvlc-bin libvlc5 libvlccore9 libvncserver1 libvpx5 libvulkan1
  libwayland-egl1 libwinpr2-2 libwoff1 libx264-152 libx265-146 libxvidcore4
  libzvbi-common libzvbi0 mysql-common ocl-icd-libopencl1 putty-tools
  python-dbus python-gi python-gobject python-wicd python3-macaroonbakery
  python3-nacl python3-protobuf python3-pymacaroons python3-rfc3339 python3-tz
  qdbus qtchooser qtcore4-l10n qttranslations5-l10n rtkit
  software-properties-common sound-icons virtualbox-dkms vlc-bin vlc-data
  wicd-daemon
使用'sudo apt autoremove'来卸载它(它们)。
将会同时安装下列软件:
  foomatic-filters libbsd0:i386 libpaps0 libxau6:i386 libxdmcp6:i386 paps
推荐安装:
  poppler-utils colord
下列软件包将被【卸载】:
  adwaita-icon-theme aisleriot albert apport-gtk at-spi2-core baobab
  bluez-cups caribou cheese chrome-gnome-shell colord cups cups-core-drivers
  cups-filters cups-filters-core-drivers dbus-x11 deja-dup eog evince
  evolution-data-server fcitx-config-common fcitx-config-gtk
  fcitx-frontend-gtk2 fcitx-frontend-gtk3 fcitx-frontend-qt4
  fcitx-frontend-qt5 fcitx-libs fcitx-module-x11 fcitx-ui-classic file-roller
  firefox fsearch fwupd gcr gdm3 gedit ghostscript-x gir1.2-appindicator3-0.1
  gir1.2-atspi-2.0 gir1.2-caribou-1.0 gir1.2-clutter-1.0 gir1.2-cogl-1.0
  gir1.2-coglpango-1.0 gir1.2-gcr-3 gir1.2-gdkpixbuf-2.0
  gir1.2-gnomebluetooth-1.0 gir1.2-gnomedesktop-3.0
  gir1.2-gst-plugins-base-1.0 gir1.2-gtk-3.0 gir1.2-gtksource-3.0
  gir1.2-gweather-3.0 gir1.2-mutter-2 gir1.2-nma-1.0 gir1.2-nmgtk-1.0
  gir1.2-notify-0.7 gir1.2-pango-1.0 gir1.2-peas-1.0 gir1.2-rb-3.0
  gir1.2-rsvg-2.0 gir1.2-totem-1.0 gir1.2-vte-2.91 gir1.2-webkit2-4.0
  gir1.2-wnck-3.0 gjs gkbd-capplet gnome-bluetooth gnome-calculator
  gnome-calendar gnome-control-center gnome-disk-utility gnome-font-viewer
  gnome-getting-started-docs gnome-initial-setup gnome-keyring gnome-logs
  gnome-mines gnome-online-accounts gnome-power-manager gnome-screensaver
  gnome-screenshot gnome-session-bin gnome-session-canberra
  gnome-settings-daemon gnome-shell gnome-software gnome-software-plugin-snap
  gnome-sudoku gnome-system-monitor gnome-terminal gnome-themes-extra
  gnome-todo gnome-user-share gnome-video-effects grilo-plugins-0.3-base
  gstreamer1.0-clutter-3.0 gstreamer1.0-gl gstreamer1.0-gtk3
  gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-pulseaudio
  gstreamer1.0-x gtk-update-icon-cache gtk2-engines-murrine
  gtk2-engines-pixbuf gucharmap gvfs gvfs-backends gvfs-daemons gvfs-fuse
  hplip humanity-icon-theme ibus ibus-gtk3 ibus-libpinyin ibus-sunpinyin
  ibus-table ibus-table-wubi imagemagick imagemagick-6.q16 keepassx
  kerneloops-applet language-selector-gnome libaa1 libappindicator3-1
  libappstream-glib8 libasound2-plugins libatk-adaptor libatk-bridge2.0-0
  libatspi2.0-0 libaudio2 libavahi-ui-gtk3-0 libavcodec57 libavformat57
  libavutil55 libcairo-gobject-perl libcairo-gobject2 libcairo-perl libcairo2
  libcairomm-1.0-1v5 libcanberra-gtk3-0 libcanberra-gtk3-module
  libcanberra-pulse libcaribou0 libcheese-gtk25 libcheese8 libchromaprint1
  libclutter-1.0-0 libclutter-gst-3.0-0 libclutter-gtk-1.0-0 libcogl-pango20
  libcogl-path20 libcogl20 libcolord-gtk1 libdazzle-1.0-0 libdbusmenu-gtk3-4
  libdfu1 libdmapsharing-3.0-2 libedataserverui-1.2-2 libegl-mesa0 libegl1
  libegl1-mesa libespeak-ng1 libevdocument3-4 libevview3-3 libfcitx-qt0
  libfcitx-qt5-1 libfreerdp-cache1.1 libfreerdp-client2-2 libfreerdp-core1.1
  libfreerdp-locale1.1 libfreerdp2-2 libgail-3-0 libgail-common libgail18
  libgcr-ui-3-1 libgd3 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin libgjs0g libgl1
  libgl1-mesa-glx libglade2-0 libglu1-mesa libglx-mesa0 libglx0
  libgnome-bluetooth13 libgnome-desktop-3-17 libgnome-games-support-1-3
  libgnomekbd8 libgoa-backend-1.0-1 libgphoto2-6 libgpod-common libgpod4
  libgspell-1-1 libgstreamer-gl1.0-0 libgtk-3-0 libgtk-3-bin libgtk2-perl
  libgtk2.0-0 libgtk2.0-bin libgtk3-perl libgtkmm-3.0-1v5
  libgtksourceview-3.0-1 libgucharmap-2-90-7 libgweather-3-15 libgxps2
  libindicator3-7 libmagickcore-6.q16-3 libmagickcore-6.q16-3-extra
  libmagickwand-6.q16-3 libmediaart-2.0-0 libmutter-2-0
  libnautilus-extension1a libnm-gtk0 libnma0 libnotify-bin libnotify4
  libpango-perl libpangocairo-1.0-0 libpangomm-1.4-1v5 libpangoxft-1.0-0
  libpcaudio0 libpeas-1.0-0 libpoppler-glib8 libpostproc54
  libpulse-mainloop-glib0 libpulse0 libpulsedsp libqt4-declarative
  libqt4-opengl libqt5gui5 libqt5opengl5 libqt5printsupport5 libqt5quick5
  libqt5svg5 libqt5widgets5 libqt5x11extras5 libqtgui4 libqtwebkit4
  libreoffice-avmedia-backend-gstreamer libreoffice-base-core libreoffice-calc
  libreoffice-core libreoffice-draw libreoffice-gnome libreoffice-gtk3
  libreoffice-help-en-gb libreoffice-help-en-us libreoffice-help-zh-cn
  libreoffice-impress libreoffice-math libreoffice-ogltrans
  libreoffice-pdfimport libreoffice-writer librhythmbox-core10 librsvg2-2
  librsvg2-common libsane1 libsdl-image1.2 libsdl1.2debian libshout3
  libstartup-notification0 libswresample2 libswscale4 libtheora0 libtk8.6
  libtotem0 libva-x11-2 libvdpau1 libvte-2.91-0 libwayland-egl1-mesa
  libwebkit2gtk-4.0-37 libwmf0.2-7 libwmf0.2-7-gtk libwnck-3-0 libx11-6
  libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-icccm4 libxcb-image0
  libxcb-keysyms1 libxcb-present0 libxcb-randr0 libxcb-render-util0
  libxcb-render0 libxcb-res0 libxcb-shape0 libxcb-shm0 libxcb-sync1
  libxcb-util1 libxcb-xfixes0 libxcb-xinerama0 libxcb-xkb1 libxcb-xv0 libxcb1
  libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxft2 libxi6
  libxinerama1 libxkbcommon-x11-0 libxkbfile1 libxklavier16 libxmu6 libxmuu1
  libxpm4 libxrandr2 libxrender1 libxres1 libxss1 libxt6 libxtst6 libxv1
  libxvmc1 libxxf86dga1 libxxf86vm1 libyelp0 light-themes mesa-va-drivers
  mesa-vdpau-drivers mousetweaks mutter nautilus
  nautilus-extension-gnome-terminal nautilus-nutstore-public
  network-manager-gnome network-manager-pptp-gnome notification-daemon orca
  pinentry-gnome3 plymouth-label plymouth-theme-ubuntu-logo policykit-1-gnome
  poppler-utils printer-driver-gutenprint printer-driver-hpcups
  printer-driver-postscript-hp printer-driver-pxljr printer-driver-splix
  pulseaudio pulseaudio-module-bluetooth pulseaudio-utils putty python-cairo
  python-glade2 python-gtk2 python-notify python3-aptdaemon.gtk3widgets
  python3-cairo python3-gi-cairo python3-pyatspi python3-uno
  qml-module-qtgraphicaleffects qml-module-qtquick-controls
  qml-module-qtquick-layouts qml-module-qtquick-window2 qml-module-qtquick2
  qt-at-spi qt5-gtk-platformtheme remmina remmina-plugin-rdp
  remmina-plugin-secret remmina-plugin-vnc rhythmbox
  rhythmbox-plugin-alternative-toolbar rhythmbox-plugins sane-utils seahorse
  shotwell simple-scan software-properties-gtk sogoupinyin speech-dispatcher
  speech-dispatcher-audio-plugins speech-dispatcher-espeak-ng spice-vdagent
  system-config-printer system-config-printer-common thunderbird
  thunderbird-gnome-support thunderbird-locale-en thunderbird-locale-en-gb
  thunderbird-locale-en-us thunderbird-locale-zh-cn thunderbird-locale-zh-hans
  tk tk8.6 transmission-gtk ubuntu-artwork ubuntu-desktop ubuntu-docs
  ubuntu-mono ubuntu-release-upgrader-gtk ubuntu-session ubuntu-software
  update-manager update-notifier usb-creator-gtk va-driver-all
  vdpau-driver-all vino virtualbox virtualbox-qt vlc vlc-plugin-base
  vlc-plugin-qt vlc-plugin-skins2 vlc-plugin-video-output x11-apps
  x11-session-utils x11-utils x11-xkb-utils x11-xserver-utils xauth xbrlapi
  xdg-user-dirs-gtk xinit xinput xorg xserver-common xserver-xephyr
  xserver-xorg xserver-xorg-core xserver-xorg-input-all
  xserver-xorg-input-libinput xserver-xorg-input-wacom xserver-xorg-legacy
  xserver-xorg-video-all xserver-xorg-video-amdgpu xserver-xorg-video-ati
  xserver-xorg-video-fbdev xserver-xorg-video-intel xserver-xorg-video-nouveau
  xserver-xorg-video-qxl xserver-xorg-video-radeon xserver-xorg-video-vesa
  xserver-xorg-video-vmware xwayland yelp zenity
下列【新】软件包将被安装:
  foomatic-filters libbsd0:i386 libpaps0 libxau6:i386 libxcb1:i386
  libxdmcp6:i386 paps
升级了 0 个软件包,新安装了 7 个软件包,要卸载 445 个软件包,有 0 个软件包未被升级。
需要下载 225 kB 的归档。
解压缩后将会空出 1,423 MB 的空间。
您希望继续执行吗? [Y/n] n
中止。

仔细看下提示后在执行!此条命令安装一个工具,却要卸载445 个软件包。包括 ubuntu-desktop,桌面没有了!ubuntu-session,无法登录了。xserver无法远程访问了。virtualbox没有了,输入法,Python等都删掉。。。。实在恶心。。

所以,linux系统apt-get安装软件,切切小心!看清楚安装什么东西,卸载什么东西再执行!

博客地址:http://blog.yoqi.me/?p=16477
扫我捐助哦
喜欢 7

这篇文章还没有评论

发表评论