我是 Ubuntu 的新手。
就在上周,我安装了 Ubuntu18。
我在新笔记本电脑上有一个双启动机器,并开启了安全启动(Windows 10 和 Ubuntu 18.04.5)。
我的笔记本电脑上有 NVIDIA GeForce GTX 1650,因此我尝试按照此处提到的步骤安装 Nvidia 驱动程序:https://gist.github.com/bitsurgeon/b0f4440984c9e60dcd8fe8bbc346c029
但是现在,NVIDIA 驱动程序没有安装,我的 apt 似乎也不起作用。每当我尝试使用 安装某些东西时sudo apt install <package-name>
,我都会不断收到此错误。
$ sudo apt install aptitude:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
aptitude:i386 : Depends: aptitude-common:i386 (= 0.8.10-6ubuntu1)
Depends: libapt-pkg5.0:i386 (>= 1.1) but it is not going to be installed
Depends: libboost-filesystem1.65.1:i386 but it is not going to be installed
Depends: libboost-iostreams1.65.1:i386 but it is not going to be installed
Depends: libboost-system1.65.1:i386 but it is not going to be installed
Depends: libcwidget3v5:i386 but it is not going to be installed
Depends: libncursesw5:i386 (>= 6) but it is not going to be installed
Depends: libsigc++-2.0-0v5:i386 (>= 2.8.0) but it is not going to be installed
Depends: libsqlite3-0:i386 (>= 3.6.5) but it is not going to be installed
Depends: libxapian30:i386 but it is not going to be installed
Recommends: libparse-debianchangelog-perl:i386 but it is not installable
libnvidia-gl-450 : Depends: libnvidia-common-450 but it is not going to be installed
libnvidia-gl-450:i386 : Depends: libnvidia-common-450:i386
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
看来我的 apt 坏了,我该如何修复?如上所述,我尝试运行sudo apt --fix-broken install
,但收到以下警告:
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
g++-6 libaccinj64-9.1 libcublas9.1 libcudart9.1 libcufft9.1 libcufftw9.1 libcurand9.1
libcusolver9.1 libcusparse9.1 libnppc9.1 libnppial9.1 libnppicc9.1 libnppicom9.1 libnppidei9.1
libnppif9.1 libnppig9.1 libnppim9.1 libnppist9.1 libnppisu9.1 libnppitc9.1 libnpps9.1
libnvblas9.1 libnvgraph9.1 libnvidia-common-450-server libnvrtc9.1 libnvtoolsext1 libnvvm3
libthrust-dev libvdpau-dev ocl-icd-opencl-dev opencl-c-headers python3-debconf
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
aptitude:i386 aptitude-common libapt-pkg5.0:i386 libboost-filesystem1.65.1:i386
libboost-iostreams1.65.1:i386 libboost-system1.65.1:i386 libbz2-1.0:i386 libcwidget3v5:i386
libgcrypt20:i386 libgpg-error0:i386 libgpm2:i386 liblz4-1:i386 liblzma5:i386 libncursesw5:i386
libnvidia-common-450 libsigc++-2.0-0v5:i386 libsqlite3-0:i386 libsystemd0:i386 libudev1:i386
libuuid1:i386 libxapian30:i386
Suggested packages:
aptitude-doc-en:i386 | aptitude-doc:i386 apt-xapian-index:i386 debtags:i386 tasksel:i386
libcwidget-dev:i386 rng-tools:i386 gpm:i386 xapian-tools:i386
Recommended packages:
libparse-debianchangelog-perl:i386 apt:i386
The following packages will be REMOVED:
apt apt-utils skypeforlinux ubuntu-desktop ubuntu-minimal ubuntu-release-upgrader-gtk
update-manager update-notifier update-notifier-common
The following NEW packages will be installed:
aptitude-common libapt-pkg5.0:i386 libboost-filesystem1.65.1:i386 libboost-iostreams1.65.1:i386
libboost-system1.65.1:i386 libbz2-1.0:i386 libcwidget3v5:i386 libgcrypt20:i386 libgpg-error0:i386
libgpm2:i386 liblz4-1:i386 liblzma5:i386 libncursesw5:i386 libnvidia-common-450
libsigc++-2.0-0v5:i386 libsqlite3-0:i386 libsystemd0:i386 libudev1:i386 libuuid1:i386
libxapian30:i386
The following packages will be upgraded:
aptitude:i386
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
apt
1 upgraded, 20 newly installed, 9 to remove and 1 not upgraded.
9 not fully installed or removed.
Need to get 6,130 kB/6,140 kB of archives.
After this operation, 295 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?]
如果不知道后果,我不应该改变,因此我在这里询问是否有人可以指出该怎么做。或者是否有关于 apt 的优秀教程,以便我了解它的工作原理以及如何解决我的问题。
寻找每一个解决方案。
编辑:
输出uname -a
:
$ uname -a
Linux mehta-hp 5.4.0-52-generic #57~18.04.1-Ubuntu SMP Thu Oct 15 14:04:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
输出gedit /var/log/apt/history.log
:https://paste.ubuntu.com/p/knfP2rhVbQ/
输出apt list --installed
:https://paste.ubuntu.com/p/G2tTz3v26b/