我运行了一个可能危险且不可预测的命令,请帮我恢复它可能做的任何更改。如果可能的话,不要重新安装 Ubuntu。我需要确保安装旧软件时没有出现严重的兼容性问题。因为如果是这样的话,我将来可能会遇到很多错误和问题,而这将是原因。
情况:我正在尝试修复 MIDI 问题。所以我找到了这个页面,找到这个命令并运行它:
sudo aptitude --purge reinstall linux-sound-base alsa-base alsa-utils linux-image-`uname -r` linux-ubuntu-modules-`uname -r` libasound2
我询问后给了 root 权限。危险的是,即使该命令是在 Ubuntu 帮助页面上建议的,页面本身顶部说它已经过时了,不应该使用不同时间。
这是官方提示(以输入的命令开始)。你能告诉我它是否损坏了我的计算机吗?我想它可能安装了非常旧的软件,因为说明在教程中,但没有推荐。我怎样才能回到以前?或者根本就没有问题?
qwerty@qwerty-RV420-RV520-RV720-E3530-S3530:~$ sudo aptitude --purge reinstall linux-sound-base alsa-base alsa-utils linux-image-`uname -r` linux-ubuntu-modules-`uname -r` libasound2
Couldn't find any package whose name or description matched "linux-ubuntu-modules-3.19.0-42-generic"
Couldn't find any package whose name or description matched "linux-ubuntu-modules-3.19.0-42-generic"
The following packages will be REINSTALLED:
alsa-base alsa-utils libasound2 linux-image-3.19.0-42-generic
linux-sound-base
0 packages upgraded, 0 newly installed, 5 reinstalled, 0 to remove and 6 not upgraded.
Need to get 1.427 kB/18,2 MB of archives. After unpacking 0 B will be used.
Get: 1 http://ar.archive.ubuntu.com/ubuntu/ trusty/main libasound2 amd64 1.0.27.2-3ubuntu7 [327 kB]
Get: 2 http://ar.archive.ubuntu.com/ubuntu/ trusty/main alsa-base all 1.0.25+dfsg-0ubuntu4 [151 kB]
Get: 3 http://ar.archive.ubuntu.com/ubuntu/ trusty/main alsa-utils amd64 1.0.27.2-1ubuntu2 [933 kB]
Get: 4 http://ar.archive.ubuntu.com/ubuntu/ trusty/main linux-sound-base all 1.0.25+dfsg-0ubuntu4 [14,5 kB]
Fetched 1.427 kB in 6s (215 kB/s)
Preconfiguring packages ...
(Reading database ... 198306 files and directories currently installed.)
Preparing to unpack .../libasound2_1.0.27.2-3ubuntu7_amd64.deb ...
Unpacking libasound2:amd64 (1.0.27.2-3ubuntu7) over (1.0.27.2-3ubuntu7) ...
Preparing to unpack .../linux-image-3.19.0-42-generic_3.19.0-42.48~14.04.1_amd64.deb ...
Done.
Unpacking linux-image-3.19.0-42-generic (3.19.0-42.48~14.04.1) over (3.19.0-42.48~14.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.19.0-42-generic /boot/vmlinuz-3.19.0-42-generic
run-parts: executing /etc/kernel/postrm.d/zz-extlinux 3.19.0-42-generic /boot/vmlinuz-3.19.0-42-generic
P: Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.19.0-42-generic.efi.signed...
P: Writing config for /boot/vmlinuz-3.19.0-42-generic...
P: Writing config for /boot/vmlinuz-3.19.0-25-generic...
P: Writing config for Windows 7 (loader) on /dev/sda1...
P: Writing config for Windows Recovery Environment (loader) on /dev/sda4...
P: Installing debian theme... done.
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.19.0-42-generic /boot/vmlinuz-3.19.0-42-generic
Preparing to unpack .../alsa-base_1.0.25+dfsg-0ubuntu4_all.deb ...
Unpacking alsa-base (1.0.25+dfsg-0ubuntu4) over (1.0.25+dfsg-0ubuntu4) ...
Preparing to unpack .../alsa-utils_1.0.27.2-1ubuntu2_amd64.deb ...
Unpacking alsa-utils (1.0.27.2-1ubuntu2) over (1.0.27.2-1ubuntu2) ...
Preparing to unpack .../linux-sound-base_1.0.25+dfsg-0ubuntu4_all.deb ...
Unpacking linux-sound-base (1.0.25+dfsg-0ubuntu4) over (1.0.25+dfsg-0ubuntu4) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
ureadahead will be reprofiled on next reboot
Setting up libasound2:amd64 (1.0.27.2-3ubuntu7) ...
Setting up linux-image-3.19.0-42-generic (3.19.0-42.48~14.04.1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Not updating initrd symbolic links since we are being updated/reinstalled
(3.19.0-42.48~14.04.1 was configured last, according to dpkg)
Not updating image symbolic links since we are being updated/reinstalled
(3.19.0-42.48~14.04.1 was configured last, according to dpkg)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-42-generic /boot/vmlinuz-3.19.0-42-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.19.0-42-generic /boot/vmlinuz-3.19.0-42-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.19.0-42-generic /boot/vmlinuz-3.19.0-42-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-42-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.19.0-42-generic /boot/vmlinuz-3.19.0-42-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.19.0-42-generic /boot/vmlinuz-3.19.0-42-generic
run-parts: executing /etc/kernel/postinst.d/zz-extlinux 3.19.0-42-generic /boot/vmlinuz-3.19.0-42-generic
P: Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.19.0-42-generic.efi.signed...
P: Writing config for /boot/vmlinuz-3.19.0-42-generic...
P: Writing config for /boot/vmlinuz-3.19.0-25-generic...
P: Writing config for Windows 7 (loader) on /dev/sda1...
P: Writing config for Windows Recovery Environment (loader) on /dev/sda4...
P: Installing debian theme... done.
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.19.0-42-generic /boot/vmlinuz-3.19.0-42-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.19.0-42-generic
Found initrd image: /boot/initrd.img-3.19.0-42-generic
Found linux image: /boot/vmlinuz-3.19.0-25-generic
Found initrd image: /boot/initrd.img-3.19.0-25-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
Found Windows Recovery Environment (loader) on /dev/sda4
Found Debian GNU/Linux (8.2) on /dev/sda5
done
Setting up linux-sound-base (1.0.25+dfsg-0ubuntu4) ...
Setting up alsa-base (1.0.25+dfsg-0ubuntu4) ...
Setting up alsa-utils (1.0.27.2-1ubuntu2) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
答案1
根据aptitude --help
purge—删除软件包及其配置文件。
重新安装——下载并(可能)重新安装当前安装的软件包。
因此,您所做的就是,清除命令中的软件包并重新安装它们。到目前为止一切顺利,但命令中只有一部分可能导致了一些问题。命令中说:
linux-image-`uname -r`
删除了活动内核,然后重新安装。虽然这种情况不太可能发生,但在极端情况下,它可能会导致一些问题。除此之外,一切都很好。
从您的输出来看,似乎没有错误并且一切都正常。
如果您仍然不确定 - 请使用以下命令检查已清除软件包的版本和其他所有内容:
apt-cache policy linux-sound-base alsa-base alsa-utils linux-image-`uname -r` libasound2