I am a beginner in Ubuntu.
Just last week I have installed Ubuntu18.
I have a dual boot machine on new laptop with Secure boot switched-on (Windows 10 and Ubuntu 18.04.5).
I have NVIDIA GeForce GTX 1650 in my laptop, so I tried to install Nvidia drivers by following the steps mentioned here: https://gist.github.com/bitsurgeon/b0f4440984c9e60dcd8fe8bbc346c029
But now, neither the NVIDIA driver is installed, nor my apt seems to work.
Whenever I try to install something using sudo apt install <package-name>
, I get this error constantly.
$ 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).
It seems my apt is broken, how do I fix this?
As suggested above, I have tried to run sudo apt --fix-broken install
, but I get this warning:
$ 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!'
?]
Without knowing the consequence, I shouldn't change things, thus I am asking here if somebody could point out what to do. Or if there is a good tutorial on apt, so that I could understand how it works and how I can fix my problem.
Looking for to every solution.
Edit:
Output of 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
Output of gedit /var/log/apt/history.log
: https://paste.ubuntu.com/p/knfP2rhVbQ/
Output of apt list --installed
: https://paste.ubuntu.com/p/G2tTz3v26b/
apt
as it's snap only, being a different system to Ubuntu 18.04 LTS. – guiverc Oct 25 '20 at 05:29aptitude
in i386 architecture if you're running amd64? Have you enabled multiarch? (and more importantly do you really need it? https://help.ubuntu.com/community/MultiArch – guiverc Oct 25 '20 at 05:45sudo apt install nvidia-driver-430
, here it automatically went to install that package which it was not able to download. I thought Nvidia requires i386 libs. Thus i tried running it manually. If it is not required, how do i remove it? – Mihir Mehta Oct 25 '20 at 05:50uname -a
in your question (use [edit] feature to edit your question). Also, let's look into your apt log. Paste this in terminal:gedit /var/log/apt/history.log
and press Enter. Now, Text Editor app will open a text file. Copy the contents of it and paste it in a pastebin (like https://paste.ubuntu.com/). Share the link of the pastebin. Don't forget to tag me (like this: @technastic_tc) if you're replying to my comment. – Random Person Oct 25 '20 at 07:22uname -a
in the question. Also, the output forgedit /var/log/apt/history.log
can be found here: https://paste.ubuntu.com/p/knfP2rhVbQ/Appreciate your time!
– Mihir Mehta Oct 26 '20 at 04:44apt list --installed
. (Use pastebin) – Random Person Oct 26 '20 at 08:05apt list --installed
at this link https://paste.ubuntu.com/p/G2tTz3v26b/ – Mihir Mehta Oct 27 '20 at 14:16sudo apt purge aptitude:i386 libnvidia-gl-450 libnvidia-gl-450:i386
? – BeastOfCaerbannog Oct 27 '20 at 18:23gedit /var/log/apt/term.log
. One more thing.. Paste this in terminal:history > history.txt
and press Enter. Now there will be a new file saved in your home directory named as "history.txt". Also share the contents of that file. (Use pastebin) – Random Person Oct 31 '20 at 14:34sudo apt update
in your question (use the [edit] feature). – Random Person Oct 31 '20 at 14:48