![刚刚错误地清除了软件包](https://linux22.com/image/1039139/%E5%88%9A%E5%88%9A%E9%94%99%E8%AF%AF%E5%9C%B0%E6%B8%85%E9%99%A4%E4%BA%86%E8%BD%AF%E4%BB%B6%E5%8C%85.png)
我错误地清除了以下软件包。我该如何重新安装它们。以下是日志。
我正在尝试删除并清除 Orca 屏幕阅读器。
开始日期:2012-08-17 07:16:01 命令行:apt-get --purge remove orca*
Upgrade: python-ubuntuone-storageprotocol:i386 (3.0.0-0ubuntu1, 3.0.0-0ubuntu1.1), libcamel-1.2-29:i386 (3.2.3-0ubuntu6, 3.2.3-0ubuntu7), libpulse0:i386 (1.1-0ubuntu15, 1.1-0ubuntu15.1), python-ubuntuone-client:i386 (3.0.0-0ubuntu1, 3.0.1-0ubuntu1.0.1)
Purge: ubuntuone-client:i386 (3.0.0-0ubuntu1), ubuntuone-control-panel:i386 (3.0.0-0ubuntu1), gstreamer0.10-alsa:i386 (0.10.36-1), libpurple0:i386 (2.10.3-0ubuntu1), liborc-0.4-0:i386 (0.4.16-1ubuntu2), gir1.2-totem-1.0:i386 (3.0.1-0ubuntu21), python-gst0.10:i386 (0.10.22-3), unity-2d:i386 (5.10.0-0ubuntu1), libyelp0:i386 (3.4.1-0ubuntu1), gstreamer0.10-x:i386 (0.10.36-1), gnome-media:i386 (3.4.0-0ubuntu2), metacity:i386 (2.34.1-1ubuntu11), bluez-gstreamer:i386 (4.98-2ubuntu7), ubuntu-docs:i386 (12.04.4), gstreamer0.10-plugins-ugly:i386 (0.10.18.3-1ubuntu1), brasero-cdrkit:i386 (3.4.1-0ubuntu1), oneconf:i386 (0.2.8), libreoffice-calc:i386 (3.5.2-2ubuntu1), zenity:i386 (3.4.0-0ubuntu2), pulseaudio:i386 (1.1-0ubuntu15), libfolks-eds25:i386 (0.6.8-2), gir1.2-ubuntuoneui-3.0:i386 (3.0.0-0ubuntu1), libreoffice-gnome:i386 (3.5.2-2ubuntu1), totem-plugins:i386 (3.0.1-0ubuntu21), rhythmbox:i386 (2.96-0ubuntu4), ubuntu-sso-client:i386 (3.0.0-0ubuntu1), gnome-control-center:i386 (3.4.1-0ubuntu1), python-ubuntuone-control-panel:i386 (3.0.0-0ubuntu1), ubuntu-desktop:i386 (1.267), libreoffice-emailmerge:i386 (3.5.2-2ubuntu1), libreoffice-core:i386 (3.5.2-2ubuntu1), gstreamer0.10-plugins-bad-multiverse:i386 (0.10.21-1), libtotem0:i386 (3.0.1-0ubuntu21), libavcodec-extra-53:i386 (0.8.3ubuntu0.12.04.1), ubuntuone-client-gnome:i386 (3.0.0-0ubuntu1), gstreamer0.10-plugins-good:i386 (0.10.31-1ubuntu1), libavformat53:i386 (0.8.3-0ubuntu0.12.04.1), libreoffice-writer:i386 (3.5.2-2ubuntu1), libreoffice-draw:i386 (3.5.2-2ubuntu1), unity-scope-musicstores:i386 (5.10.0-0ubuntu1), shotwell:i386 (0.12.2-0ubuntu2), libdmapsharing-3.0-2:i386 (2.9.14-1), rhythmbox-mozilla:i386 (2.96-0ubuntu4), software-center:i386 (5.2), libsyncdaemon-1.0-1:i386 (3.0.0-0ubuntu1), libschroedinger-1.0-0:i386 (1.0.11-1), rhythmbox-plugin-zeitgeist:i386 (2.96-0ubuntu4), libwebkitgtk-3.0-0:i386 (1.8.0-0ubuntu2), gir1.2-webkit-3.0:i386 (1.8.0-0ubuntu2), ubuntu-sso-client-gtk:i386 (3.0.0-0ubuntu1), libreoffice-base-core:i386 (3.5.2-2ubuntu1), gnome-orca:i386 (3.4.0-0ubuntu2), gstreamer0.10-ffmpeg:i386 (0.10.13-1), rhythmbox-plugin-cdrecorder:i386 (2.96-0ubuntu4), telepathy-haze:i386 (0.6.0-0ubuntu1), libubuntuoneui-3.0-1:i386 (3.0.0-0ubuntu1), librhythmbox-core5:i386 (2.96-0ubuntu4), libreoffice-help-en-us:i386 (3.5.2-2ubuntu1), python-uno:i386 (3.5.2-2ubuntu1), libreoffice-style-human:i386 (3.5.2-2ubuntu1), sessioninstaller:i386 (0.20+bzr123-0ubuntu2), pulseaudio-module-bluetooth:i386 (1.1-0ubuntu15), libtelepathy-farstream2:i386 (0.4.0-0ubuntu1), gstreamer0.10-pulseaudio:i386 (0.10.31-1ubuntu1), pulseaudio-module-x11:i386 (1.1-0ubuntu15), gnome-online-accounts:i386 (3.4.0-0ubuntu1), libgoa-1.0-0:i386 (3.4.0-0ubuntu1), gnome-user-guide:i386 (3.4.1-1), apturl:i386 (0.5.1ubuntu3), libreoffice-impress:i386 (3.5.2-2ubuntu1), indicator-datetime:i386 (0.3.94-0ubuntu2), nautilus-share:i386 (0.7.3-1ubuntu2), gstreamer0.10-plugins-bad:i386 (0.10.22.3-2ubuntu2), evolution-data-server:i386 (3.2.3-0ubuntu6), rhythmbox-plugins:i386 (2.96-0ubuntu4), libgstreamer-plugins-bad0.10-0:i386 (0.10.22.3-2ubuntu2), python-ubuntu-sso-client:i386 (3.0.0-0ubuntu1), gimp:i386 (2.6.12-1ubuntu1), libbrasero-media3-1:i386 (3.4.1-0ubuntu1), rhythmbox-ubuntuone:i386 (3.0.0-0ubuntu1), yelp:i386 (3.4.1-0ubuntu1), gir1.2-rb-3.0:i386 (2.96-0ubuntu4), libreoffice-math:i386 (3.5.2-2ubuntu1), pulseaudio-module-gconf:i386 (1.1-0ubuntu15), indicator-sound:i386 (0.8.5.0-0ubuntu2), libcanberra-pulse:i386 (0.28-3ubuntu3), libmjpegtools-1.9:i386 (1.9.0-0.5ubuntu7), brasero:i386 (3.4.1-0ubuntu1), libreoffice-common:i386 (3.5.2-2ubuntu1), libwebkitgtk-1.0-0:i386 (1.8.0-0ubuntu2), libquicktime2:i386 (1.2.3-4build2), totem:i386 (3.0.1-0ubuntu21), gstreamer0.10-plugins-base:i386 (0.10.36-1), indicator-power:i386 (2.0-0ubuntu1), libgstreamer-plugins-base0.10-0:i386 (0.10.36-1), libfarstream-0.1-0:i386 (0.1.2-0ubuntu1), totem-mozilla:i386 (3.0.1-0ubuntu21), libreoffice-style-tango:i386 (3.5.2-2ubuntu1), libreoffice-gtk:i386 (3.5.2-2ubuntu1), rhythmbox-plugin-magnatune:i386 (2.96-0ubuntu4)
答案1
看起来 apt-get 的通配符搜索功能坏了!我尝试了一些模拟(-s
选项)。
我尝试了一下sudo apt-get -s --purge remove orca*
,它说要删除 84 个包。
我尝试了一下sudo apt-get -s --purge remove orc*
,数字上升到了 1446。
我尝试过sudo apt-get -s --purge remove orcaa*
,列表是“gnome-orca”和“ngorca”。
我同意重新安装ubuntu-desktop
然后使用选项测试通配符搜索的建议-s
,以便在执行该操作之前为您提供它将要执行的操作的列表。
现在,维护人员的错误报告地址在哪里apt-get
...:)
在记录错误报告时,我意识到匹配是一个正则表达式,因此 '*' 表示zero or more of the preceeding character
.orcaa*
有效,因为 'o','r','c','a' 后跟零或更多“a”字符,因此“a*”仅用于将其标记为正则表达式搜索,而不是精确匹配。通常,它应该是“.*”,表示零个或多个任意字符。
您的匹配项“orca*”可匹配任何带有“o”、“r”、“c”且后跟零个或多个“a”字符的软件包,因此您会获得更多软件包。例如,它匹配了 ,liborc-0.4.0
这会强制删除依赖于此的软件包。apt-get
也可能删除了为满足依赖关系而安装但不再需要的其他项目。
(PS:这不是一个 Bug!)
答案2
你应该能够通过重新安装回到正常状态ubuntu-desktop
。
不过它可能会重新安装 orca :)
要 chroot 并从 LiveCD 恢复:
- 启动到 LiveCD 并单击“尝试”。
- 设置你的网络连接。你会需要它的。
- 打开一个终端。其余部分由终端驱动。
使用以下命令找出
/dev/sdXY
真实分区的路径:sudo fdisk -l
将其安装在下面
/mnt
(将 XY 更改为您在 #4 中找到的内容):sudo mount /dev/sdXY /mnt
交叉安装一些正在运行的东西(这样 chroot 就可以实时访问硬件):
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
像忍者一样进入 Chroot!
sudo chroot /mnt
修复一切!
sudo apt-get install ubuntu-desktop