Answer the question
In order to leave comments, you need to log in
Do I need to run sudo apt update before installing programs?
Good afternoon! I just installed ubuntu in a virtual machine. I want to put some programs through apt.
I started with telegram, the instructions from the losst site said to first check if I have the required repository connected (connected), then run sudo apt update, then sudo apt install telegram-desktop.
Here's what I noticed:
1) If you install TG without sudo apt update, then everything is in order.
2) If you first execute sudo apt update, then the TG is not installed, it gives the error "Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend". The command ps aux | grep -i apt
outputs the following:
root 3049 0.0 0.0 2616 544 ? Ss 14:53 0:00 /bin/sh /usr/lib/apt/apt.systemd.daily update
root 3056 0.0 0.0 2616 1852 ? S 14:53 0:00 /bin/sh /usr/lib/apt/apt.systemd.daily lock_is_held update
root 3713 0.0 0.1 20560 4472 pts/0 T 14:54 0:00 sudo apt install telegram-desktop
root 3714 0.0 0.2 27336 8432 pts/0 T 14:54 0:00 apt install telegram-desktop
anastas+ 4971 0.0 0.0 1084 296 pts/0 D+ 14:58 0:00 grep --color=auto -i apt
Answer the question
In order to leave comments, you need to log in
1. No, not in front of everyone. It is enough to do this periodically (as far as I understand, apt systemd daily does this as well).
2. Yes, it only updates the database. sudo apt upgrade updates the installed programs themselves (according to the database, that is, after sudo apt update)
3. Wait. Disable or configure apt systemd daily. https://andreyex.ru/linux/chto-takoe-apt-systemd-daily/
In addition to the previous answers, I will give advice: if you want a more intuitive and visually advanced version of the installer, I recommend installing Synaptic.
It just allows you to do the same thing as apt, but in a graphical environment.
sudo apt install synaptic
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question