Whenever I Run
sudo apt Or
sudo apt-get it says:
hoidberg@Hoidberg:~$ sudo apt-get dist-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: libsdl2-2.0-0 : Breaks: libsdl2-2.0-0:i386 (!= 2.0.8+1) but 2.0.8+dfsg1-4ubuntu1 is installed libsdl2-2.0-0:i386 : Breaks: libsdl2-2.0-0 (!= 2.0.8+dfsg1-4ubuntu1) but 2.0.8+1 is installed libsdl2-dev : Depends: libsdl2-2.0-0 (= 2.0.8+dfsg1-4ubuntu1) but 2.0.8+1 is installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
but when I run
sudo apt --fix-broken install it says:
hoidberg@Hoidberg:~$ sudo apt --fix-broken install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following additional packages will be installed: libsdl2-2.0-0 The following packages will be upgraded: libsdl2-2.0-0 1 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. 17 not fully installed or removed. Need to get 0 B/381 kB of archives. After this operation, 135 kB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 297753 files and directories currently installed.) Preparing to unpack .../libsdl2-2.0-0_2.0.8+dfsg1-4ubuntu1_amd64.deb ... Unpacking libsdl2-2.0-0:amd64 (2.0.8+dfsg1-4ubuntu1) over (2.0.8+1) ... dpkg: error processing archive /var/cache/apt/archives/libsdl2-2.0-0_2.0.8+dfsg1-4ubuntu1_amd64.deb (--unpack): trying to overwrite shared '/usr/share/doc/libsdl2-2.0-0/copyright', which is different from other instances of package libsdl2-2.0-0:amd64 Errors were encountered while processing: /var/cache/apt/archives/libsdl2-2.0-0_2.0.8+dfsg1-4ubuntu1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
or when I run
apt --fix-broken install it says:
hoidberg@Hoidberg:~$ apt --fix-broken install E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
how can I fix this?