Can't do "apt-get upgrade" even after "apt --fix-broken install"

Hi,

I was trying to install labelImg and stuck at wheel, and then errors starts to happen. (I guess)
I did try to clear the cache and stuff.
And here is the PATH

nvidia@ubuntu:~$ echo $PATH
/usr/local/cuda-11.4/bin:/home/nvidia/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
nvidia@ubuntu:~$ 

nvidia@ubuntu:~$ sudo apt-get upgrade
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:
 cuda-libraries-dev-11-4 : Depends: cuda-profiler-api-11-4 (>= 11.4.239) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
nvidia@ubuntu:~$ sudo apt-get clean
nvidia@ubuntu:~$ sudo apt-get update
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 https://deb.nodesource.com/node_16.x focal InRelease                     
Hit:3 https://repo.download.nvidia.com/jetson/common r34.1 InRelease           
Get:4 https://repo.download.nvidia.com/jetson/t234 r34.1 InRelease [2,547 B]   
Hit:5 https://download.docker.com/linux/ubuntu focal InRelease                 
Ign:6 https://download.docker.com/linux/debian focal InRelease            
Hit:7 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Err:8 https://download.docker.com/linux/debian focal Release
  404  Not Found [IP: 13.225.103.10 443]
Hit:9 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
Hit:10 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
Hit:11 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/debian focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
nvidia@ubuntu:~$ sudo apt-get upgrade -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  cuda-nvprof-11-4 libfwupdplugin1
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  cuda-profiler-api-11-4
The following packages will be upgraded:
  base-files language-pack-en language-pack-en-base python-apt-common
  python3-apt
5 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
Need to get 690 kB of archives.
After this operation, 128 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://repo.download.nvidia.com/jetson/common r34.1/main arm64 cuda-profiler-api-11-4 arm64 11.4.239-1 [18.6 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 base-files arm64 11ubuntu5.6 [60.3 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 language-pack-en all 1:20.04+20220818 [1,904 B]
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 language-pack-en-base all 1:20.04+20220818 [445 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 python-apt-common all 2.0.0ubuntu0.20.04.8 [17.1 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 python3-apt arm64 2.0.0ubuntu0.20.04.8 [147 kB]
Fetched 690 kB in 2s (381 kB/s)    
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 169604 files and directories currently installed.)
Preparing to unpack .../cuda-profiler-api-11-4_11.4.239-1_arm64.deb ...
Unpacking cuda-profiler-api-11-4 (11.4.239-1) ...
dpkg: error processing archive /var/cache/apt/archives/cuda-profiler-api-11-4_11.4.239-1_arm64.deb (--unpack):
 trying to overwrite '/usr/local/cuda-11.4/targets/aarch64-linux/include/cudaProfiler.h', which is also in package cuda-nvprof-11-4 11.4.166-1
Preparing to unpack .../base-files_11ubuntu5.6_arm64.deb ...
Warning: Stopping motd-news.service, but it can still be activated by:
  motd-news.timer
Unpacking base-files (11ubuntu5.6) over (11ubuntu5.5) ...
Errors were encountered while processing:
 /var/cache/apt/archives/cuda-profiler-api-11-4_11.4.239-1_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
nvidia@ubuntu:~$ sudo apt-get upgrade
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:
 cuda-libraries-dev-11-4 : Depends: cuda-profiler-api-11-4 (>= 11.4.239) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
nvidia@ubuntu:~$ apt --fix-broken install cuda-libraries-dev-11-4
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
nvidia@ubuntu:~$ sudo apt --fix-broken install cuda-libraries-dev-11-4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
cuda-libraries-dev-11-4 is already the newest version (11.4.14-1).
cuda-libraries-dev-11-4 set to manually installed.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 cuda-libraries-dev-11-4 : Depends: cuda-profiler-api-11-4 (>= 11.4.239) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
nvidia@ubuntu:~$ 

Ok, I found the solution from here :>

sudo apt --fix-broken install -o Dpkg::Options::="--force-overwrite"

Glad to know issue fixed.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.