18.04 – APT seems broken in my Ubuntu

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.

Why is XRDP not working? Ive followed numerous tutorials and I still cant connect. (New to Ubuntu)

When trying to connect to my Ubuntu 20.04 system from my windows 10 laptop, it says it cannot connect. Ive tried using xfce4 and others but it says the same thing. I have allowed 3389 through the firewall and it still doesnt allow me to connect. How can I fix it?

Clone ubuntu and windows to new SSD

I want to switch to SSD from HDD. I have dual boot on my hp laptop. My c drive in windows and ubuntu / directories have less size than new SSD. How to clone whole systems without reinstalling everything if that’s possible. Noob here .Thanks in advance.

upgrade – Ubuntu mishap during update 18.04 to 20.04

So during the install my Gnome UI became unresponsive to mouse clicks. There was a point during the install where it sacked me if I wish to replace some system file, merge it or keep old. So while trying to do anything so that the install could just continue I succeeded by hitting enter on keyboard. This chose the ‘n’ option in the visible terminal (I believe this means it kept my version/old). I forgot to remember for which file that was maybe something in /etc/. Can some one help me so that I can see what are the changes and try merging by downloading the “new” version from somewhere. Are there upgrade logs saved somewhere where I can see what happened during upgrade?

networking – Ubuntu 16.04: WiFi connection unavailable after shutdown (Network Unclaimed)

After restarting the machine, WiFi became unavailable.

I ran lshw -c network, and here is the output:

*-network UNCLAIMED
description: Ethernet controller
product: Ethernet Connection (7) I219-V
vendor: Intel Corporation
physical id: 1f.6
bus info: pci@0000:00:1f.6
version: 10
width: 32 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list
configuration: latency=0
resources: memory:a1100000-a111ffff

I also ran lspci:

  • 00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host
    Bridge/DRAM Registers (rev 07)
  • 00:02.0 VGA compatible controller: Intel Corporation Device 3e92
  • 00:12.0 Signal processing controller: Intel Corporation Cannon Lake
    PCH Thermal Controller (rev 10)
  • 00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1
    xHCI Host Controller (rev 10)
  • 00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM
    (rev 10)
  • 00:16.0 Communication controller: Intel Corporation Cannon Lake PCH
    HECI Controller (rev 10)
  • 00:17.0 SATA controller: Intel Corporation Cannon Lake PCH SATA AHCI
    Controller (rev 10)
  • 00:1f.0 ISA bridge: Intel Corporation Device a308 (rev 10)
  • 00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)
  • 00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller
    (rev 10)
  • 00:1f.5 Serial bus controller (0c80): Intel Corporation Cannon Lake
    PCH SPI Controller (rev 10)
  • 00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection
    (7) I219-V (rev 10)

My machine is running on Ubuntu 16.04:

  • LSB
    Version: core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
  • Distributor ID: Ubuntu
  • Description: Ubuntu 16.04.6 LTS
  • Release: 16.04
  • Codename: xenial

Any help would be much appreciated.

Thank you very much

dual boot – Ubuntu cannot turn back on after suspend

I have a Lenovo-Legion-Y530-15ICH laptop. Initially I had a dual boot system with Ubuntu 20.04 and Windows 10. After upgrading to Ubuntu 20.10 the problem appeared. Specifically, when I try to turn it on after suspension, a black screen appears with a dash on the upper left corner, that does not even blink and freezes there. It doesn’t even show the log-in screen. It is totally unresponsive and every time I have to reboot it with the power button. I removed 20.10 and reinstalled it from scratch (along with windows 10) but nothing changed. In Ubuntu 20.04 I didn’t have this problem.
Any ideas? Thank you in advance!

preseed – autoinstall options ignored on Ubuntu 20.04

Have been using preseed to install systems for awhile and wanted to learn about autoinstall/cloud-init. I was working through the example here: https://ubuntu.com/server/docs/install/autoinstall-quickstart and noticed that my installer doesn’t download the cloud-init hosted on my webserver. I’ve validated the webserver via wget and am monitoring the logfiles on it to see that there’s no GET generated by the installer. My iPXE config (adapted from the kvm example) is listed below. What am I missing here?

#!ipxe

dhcp

initrd http://(...)/amd64/initrd.gz

kernel http://(...)/amd64/linux initrd=initrd.gz auto=true netcfg/choose_interface=${net0/mac} debian-installer/local=en_US keyboard-configuration/layoutcode=us autoinstall net.ifnames=0 biosdevname=0 ip=dhcp ipv6.disable=1 ds=nocloud-net;s=http://192.168.1.187/

python – Errors when installing python3-dev on Ubuntu 20.04

I am trying to install some Python modules and I get errors with the python3-dev.

I do

sudo apt-get install python3-dev

and I get the following errors:

The following packages have unmet dependencies:
python3-dev : Depends: libpython3-dev (= 3.8.2-0ubuntu2) but it is not going to be installed
              Depends: python3.8-dev (>= 3.8.2-1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

  

I did

sudo apt-get install libpython3-dev

and I got the errors:

The following packages have unmet dependencies:
    libpython3-dev : Dépend: libpython3.8-dev (>= 3.8.2-1~) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

How could I solve this problem? It is driving me crazy since two days ago!

rsyslog – How to rotate a log file in ubuntu 18.04

I am using metabase on a digital ocean droplet with ubuntu 18.04. I followed metabase documentation for debian, but the problem is that after a while, I ended up with a 11GB log file in /var/logs/metabase.log.

I cannot figure out how to rotate/limit the log file by size or something.

Frankly I don’t really use the log at all but I would like it to be there just in case, but smaller.