Score:0

I am trying to update ubuntu but is not working

br flag

I have this problem and I don t know what to do, I have tried a couple of things but I am stuck. Can you help me please. enter image description here

enter image description here

Output of sudo apt update; sudo apt -f install:

$ sudo apt update; sudo apt -f install
Hit:1 http://gb.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:3 http://gb.archive.ubuntu.com/ubuntu focal-updates InRelease              
Hit:4 http://archive.canonical.com/ubuntu focal InRelease                      
Hit:5 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu focal InRelease     
Hit:6 http://gb.archive.ubuntu.com/ubuntu focal-backports InRelease            
Hit:7 http://ppa.launchpad.net/lutris-team/lutris/ubuntu focal InRelease       
Get:8 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease [6,263 B]      
Hit:9 http://download.opensuse.org/repositories/home:/strycore/Debian_10 ./ InRelease
Hit:10 https://linux.teamviewer.com/deb stable InRelease                       
Hit:11 https://dl.google.com/linux/chrome/deb stable InRelease                 
Hit:12 https://ocean.surfshark.com/debian stretch InRelease                    
Hit:13 https://packages.microsoft.com/ubuntu/20.04/mssql-server-2019 focal InRelease
Hit:14 https://packages.microsoft.com/repos/ms-teams stable InRelease
Hit:15 http://packages.ros.org/ros/ubuntu focal InRelease 
Get:16 https://dl.winehq.org/wine-builds/ubuntu bionic/main amd64 Packages [939 kB]
Get:17 https://dl.winehq.org/wine-builds/ubuntu bionic/main i386 Packages [975 kB]
Fetched 1,920 kB in 2s (877 kB/s)                     
Reading package lists... Done
Building dependency tree       
Reading state information... Done
59 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  python3-catkin
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  python3-catkin-pkg-modules
The following NEW packages will be installed
  python3-catkin-pkg-modules
0 to upgrade, 1 to newly install, 0 to remove and 59 not to upgrade.
500 not fully installed or removed.
Need to get 0 B/42.4 kB of archives.
After this operation, 254 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 399552 files and directories currently installed.)
Preparing to unpack .../python3-catkin-pkg-modules_0.4.24-1_all.deb ...
Unpacking python3-catkin-pkg-modules (0.4.24-1) ...
dpkg: error processing archive /var/cache/apt/archives/python3-catkin-pkg-module
s_0.4.24-1_all.deb (--unpack):
 trying to overwrite '/usr/lib/python3/dist-packages/catkin_pkg/__init__.py', wh
ich is also in package python3-catkin-pkg 0.4.16-1
Errors were encountered while processing:
 /var/cache/apt/archives/python3-catkin-pkg-modules_0.4.24-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Someone avatar
my flag
Please [edit] to post the output of `sudo apt update; sudo apt -f install`
br flag
I have tried and I have updated the post
Soren A avatar
mx flag
Please don't add screenshots of terminal text .. they are difficult to read and search in. Instead copy/paste the text into OP and format it properly.
br flag
ok I edit it. Thanks.
Nate T avatar
it flag
What commands did you run to get here? The last command in your screenshot needed to have `sudo`... but I,m guessing youre not at that point any longer?
br flag
I run it with sudo as well and is the same problem
Nate T avatar
it flag
The other error in that image `could not lock...` means e.g. you have apt loaded in another terminal somewhere. Do you have any `apt install` instances waiting on `Y/n` or similar? This will block Apt in all the other terminals you have loaded. Somewhere you have another process blocking `dpkg`
Nate T avatar
it flag
run the command `dpkg-query -l '*' ` and look at the list output. Each line will start with a 2-letter descriptor. Which descriptors are you seeing most on your list.
Someone avatar
my flag
Does this answer your question? [dpkg error: "trying to overwrite file, which is also in..."](https://askubuntu.com/questions/176121/dpkg-error-trying-to-overwrite-file-which-is-also-in).
Score:1
cn flag

The specific problem you are encountering is indeed a clear duplicate of dpkg error: "trying to overwrite file, which is also in...", but there's an underlying problem: Your system has lots of newer software from several non-Ubuntu sources bolted onto an older LTS. We call this a "Frankensystem".

  • LTS releases are stable and secure for five years if you don't change the software.
  • Frankensystems tend to be unstable, and the various sources often provide packages that conflict with each other...which is exactly the problem you have.
  • Generally, most folks who want newer software will get the best experience if they use a newer release of Ubuntu --or-- install the newer software using a snap instead of a deb.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.