Try ‘apt –fix-broken install’ with no packages

This is an annoyed issue, but after several tries, here is my approach for the fix:

sudo dpkg --configure --force-overwrite -a
# or
sudo apt -o Dpkg::Options::="--force-overwrite" --fix-broken install
Add to my src(0)

No account yet? Register

Install Mongodb on Ubuntu

Command line to install mongoDB on Ubuntu

sudo apt-get install gnupg
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo systemctl start mongod
sudo systemctl enable mongod
Add to my src(0)

No account yet? Register

Ubuntu Zoom Virtual Background without physical green screen

Virtual background in zoom is indeed a great feature, but unfortunately it doesn’t work on Ubuntu without a physical or real green screen. So here are some steps and commands you could run and make it work. (I use this on Ubuntu 20.04 but basically it should work for Lubuntu, LinuxMint, Debian or other systems as well as everything is via docker)

First install docker if you haven’t got it on your system already: https://leftsidemonitor.com/install-docker-and-docker-compose-on-linux/

Then run the following commands to install some required libraries

sudo apt install v4l2loopback-dkms;
sudo modprobe -r v4l2loopback;
sudo modprobe v4l2loopback devices=1 video_nr=20 card_label="v4l2loopback" exclusive_caps=1;

Now let’s clone this repo: https://github.com/leftsidemonitor/ubuntu-zoom-virtual-background, and run everything via docker

# Clone
git clone https://github.com/leftsidemonitor/ubuntu-zoom-virtual-background.git ~/ubuntu-zoom-virtual-background
cd ~/ubuntu-zoom-virtual-background
cp docker_defaults.env .env

docker-compose up &;	

When you don’t want to use the webcam anymore, let’s stop it

cd ~/ubuntu-zoom-virtual-background; 
docker-compose down &;

Let’s also add some aliases some next time you can run and stop this much faster as well

# add to ~/.bashrc or ~/.zshrc 
alias fakecam='sudo modprobe -r v4l2loopback;sudo modprobe v4l2loopback devices=1 video_nr=20 card_label="v4l2loopback" exclusive_caps=1;cd ~/ubuntu-zoom-virtual-background; docker-compose up &;'
alias stopcam='cd ~/ubuntu-zoom-virtual-background; docker-compose down &;'

That’s it, let us know if you manage to get it working in Zoom and other video calling software as well.

Add to my src(0)

No account yet? Register

Fix snap application is missing on menu

If you’re using Lubuntu or switch from Gnome to KDE Plasma, chances are your apps installed by using snap / or Ubuntu store are missing. The following single command will help bring them back

# Link all shortcuts installed by snap to .local/share/applications, that's it!
ln -s /var/lib/snapd/desktop/applications/* ~/.local/share/applications
Add to my src(0)

No account yet? Register

How to create swap file on Ubuntu

Normally a 2GB should be enough for swap on Ubuntu, the following commands will help you create that, but you can also make change to fit your need.

sudo swapoff -a # turn off current swap so it can be updated
sudo fallocate -l 2G /swapfile # create a /swapfile of 2GB, if you want 16GB just change this number
sudo chmod 600 /swapfile # change write permission
sudo mkswap /swapfile # make the file as swap
sudo swapon /swapfile # finally add it to swap config

Then you also need to edit this file /etc/fstab as following for swap section:

/swapfile swap swap defaults 0 0
Add to my src(0)

No account yet? Register