Score:2

Fix "sudo apt --fix-broken install" "sudo apt remove libc6:amd64" "sudo dpkg --configure -a" and can not delete packages in Ubuntu20.04

ye flag

CONCLUSION: Thank you all who helped me in this problem. Now I have tried nearly all related methods but still can not figure it out.

So I plan to reinstall the whole system.

P.S. NEVER STOP a processing program, or you will have the same problem with me.


Question:

I actually tried many many methods but still not figure it out. Anyone can help me?

My system is Ubuntu 20.04, when I run the code below

sudo apt --fix-broken install

I got an error message

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libopencc2 libopencc2-data
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  locales
The following NEW packages will be installed
  locales
0 to upgrade, 1 to newly install, 0 to remove and 0 not to upgrade.
3 not fully installed or removed.
Need to get 0 B/6,592 kB of archives.
After this operation, 17.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
dpkg: error processing package libc6:amd64 (--configure):
 package libc6:amd64 is not ready for configuration
 cannot configure (current status 'half-installed')
Errors were encountered while processing:
 libc6:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried to remove

sudo apt remove libc6:amd64

The I got

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.
 accountsservice : Depends: libc6 (>= 2.4) but it is not going to be installed
 acl : Depends: libc6 (>= 2.14) but it is not going to be installed
 acpid : Depends: libc6 (>= 2.27) but it is not going to be installed
 activity-log-manager : Depends: libc6 (>= 2.4) but it is not going to be installed
 alsa-utils : Depends: libc6 (>= 2.29) but it is not going to be installed
 anacron : Depends: libc6 (>= 2.7) but it is not going to be installed
 apg : Depends: libc6 (>= 2.14) but it is not going to be installed
 apparmor : Depends: libc6 (>= 2.17) but it is not going to be installed
 appstream : Depends: libc6 (>= 2.4) but it is not going to be installed
 apt : Depends: libc6 (>= 2.15) but it is not going to be installed
 apt-utils : Depends: libc6 (>= 2.14) but it is not going to be installed
 aspell : Depends: libc6 (>= 2.14) but it is not going to be installed
 at-spi2-core : Depends: libc6 (>= 2.7) but it is not going to be installed
 avahi-autoipd : Depends: libc6 (>= 2.14) but it is not going to be installed
 avahi-daemon : Depends: libc6 (>= 2.27) but it is not going to be installed
 avahi-utils : Depends: libc6 (>= 2.4) but it is not going to be installed
 bamfdaemon : Depends: libc6 (>= 2.14) but it is not going to be installed
 baobab : Depends: libc6 (>= 2.4) but it is not going to be installed
 base-files : Depends: libc6 (>= 2.3.4) but it is not going to be installed
 base-passwd : Depends: libc6 (>= 2.8) but it is not going to be installed
 bash : PreDepends: libc6 (>= 2.15) but it is not going to be installed
 bc : Depends: libc6 (>= 2.14) but it is not going to be installed
 bind9-dnsutils : Depends: libc6 (>= 2.4) but it is not going to be installed
 bind9-host : Depends: libc6 (>= 2.4) but it is not going to be installed
 bind9-libs : Depends: libc6 (>= 2.17) but it is not going to be installed
 binutils-x86-64-linux-gnu : Depends: libc6 (>= 2.27) but it is not going to be installed
 blender : Depends: libc6 (>= 2.29) but it is not going to be installed
 bluez : Depends: libc6 (>= 2.17) but it is not going to be installed
 bluez-cups : Depends: libc6 (>= 2.15) but it is not going to be installed
 bluez-obexd : Depends: libc6 (>= 2.28) but it is not going to be installed
 bolt : Depends: libc6 (>= 2.28) but it is not going to be installed
 brightnessctl : Depends: libc6 (>= 2.27) but it is not going to be installed
 brltty : Depends: libc6 (>= 2.27) but it is not going to be installed
 bsdmainutils : Depends: libc6 (>= 2.14) but it is not going to be installed
 bsdutils : PreDepends: libc6 (>= 2.17) but it is not going to be installed
 bubblewrap : Depends: libc6 (>= 2.16) but it is not going to be installed
 busybox-initramfs : Depends: libc6 (>= 2.28) but it is not going to be installed
 bzip2 : Depends: libc6 (>= 2.14) but it is not going to be installed
 cheese : Depends: libc6 (>= 2.4) but it is not going to be installed
 colord : Depends: libc6 (>= 2.29) but it is not going to be installed
 compiz-core : Depends: libc6 (>= 2.14) but it is not going to be installed
 compiz-gnome : Depends: libc6 (>= 2.7) but it is not going to be installed
 compiz-plugins-default : Depends: libc6 (>= 2.29) but it is not going to be installed
 copyq : Depends: libc6 (>= 2.14) but it is not going to be installed
 coreutils : PreDepends: libc6 (>= 2.28) but it is not going to be installed
 cpio : Depends: libc6 (>= 2.17) but it is not going to be installed
 cpp-9 : Depends: libc6 (>= 2.14) but it is not going to be installed
 cracklib-runtime : Depends: libc6 (>= 2.4) but it is not going to be installed
 crda : Depends: libc6 (>= 2.7) but it is not going to be installed
 cron : Depends: libc6 (>= 2.7) but it is not going to be installed
 cups : Depends: libc6 (>= 2.16) but it is not going to be installed
 cups-browsed : Depends: libc6 (>= 2.7) but it is not going to be installed
 cups-bsd : Depends: libc6 (>= 2.4) but it is not going to be installed
 cups-client : Depends: libc6 (>= 2.7) but it is not going to be installed
 cups-core-drivers : Depends: libc6 (>= 2.7) but it is not going to be installed
 cups-daemon : Depends: libc6 (>= 2.15) but it is not going to be installed
 cups-filters : Depends: libc6 (>= 2.29) but it is not going to be installed
 cups-filters-core-drivers : Depends: libc6 (>= 2.14) but it is not going to be installed
...TOO LONG SO I JUST CUT THE START AND THE END...
 xserver-xorg-video-qxl : Depends: libc6 (>= 2.14) but it is not going to be installed
 xserver-xorg-video-radeon : Depends: libc6 (>= 2.17) but it is not going to be installed
 xserver-xorg-video-vesa : Depends: libc6 (>= 2.14) but it is not going to be installed
 xserver-xorg-video-vmware : Depends: libc6 (>= 2.14) but it is not going to be installed
 xwayland : Depends: libc6 (>= 2.29) but it is not going to be installed
 xxd : Depends: libc6 (>= 2.3.4) but it is not going to be installed
 xz-utils : Depends: libc6 (>= 2.17) but it is not going to be installed
 yelp : Depends: libc6 (>= 2.4) but it is not going to be installed
 zeitgeist-core : Depends: libc6 (>= 2.14) but it is not going to be installed
 zeitgeist-datahub : Depends: libc6 (>= 2.4) but it is not going to be installed
 zenity : Depends: libc6 (>= 2.4) but it is not going to be installed
 zip : Depends: libc6 (>= 2.14) but it is not going to be installed
 zlib1g : Depends: libc6 (>= 2.14) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Can anyone help me?

UPDATE

When I run

sudo apt install --reinstall libc6:amd64

I got

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.
 language-pack-en-base : Depends: locales (>= 2.3.6) but it is not going to be installed
 language-pack-gnome-en-base : Depends: locales (>= 2.3.6) but it is not going to be installed
 language-pack-gnome-zh-hans-base : Depends: locales (>= 2.3.6) but it is not going to be installed
 language-pack-zh-hans-base : Depends: locales (>= 2.3.6) but it is not going to be installed
 libreoffice-l10n-en-gb : Depends: locales but it is not going to be installed or
                                   locales-all
 libreoffice-l10n-en-za : Depends: locales but it is not going to be installed or
                                   locales-all
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Then I run

sudo dpkg --configure -a

I got

dpkg: error processing package libc6:i386 (--configure):
 package libc6:i386 cannot be configured because libc6:amd64 is not ready (current status 'half-installed')
dpkg: dependency problems prevent configuration of libcrypt1:i386:
 libcrypt1:i386 depends on libc6 (>= 2.25); however:
  Package libc6:i386 is not configured yet.

dpkg: error processing package libcrypt1:i386 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent processing triggers for libc-bin:
 libc-bin depends on libc6 (>> 2.31); however:
  Package libc6:amd64 is not installed.
 libc-bin depends on libc6 (<< 2.32); however:
  Package libc6:amd64 is not installed.

dpkg: error processing package libc-bin (--configure):
 dependency problems - leaving triggers unprocessed
dpkg: dependency problems prevent processing triggers for man-db:
 man-db depends on libc6 (>= 2.28); however:
  Package libc6:amd64 is not installed.

dpkg: error processing package man-db (--configure):
 dependency problems - leaving triggers unprocessed
Errors were encountered while processing:
 libc6:i386
 libcrypt1:i386
 libc-bin
 man-db

When I tried

sudo aptitude reinstall libc6:amd64

It shows

sudo: aptitude: command not found

Then, I tried

sudo apt-get install aptitude

I got

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.
 aptitude : Depends: aptitude-common (= 0.8.12-1ubuntu4) but it is not going to be installed
            Depends: libcwidget4 (>= 0.5.18-1) but it is not going to be installed
            Recommends: libparse-debianchangelog-perl but it is not going to be installed
 language-pack-en-base : Depends: locales (>= 2.3.6) but it is not going to be installed
 language-pack-gnome-en-base : Depends: locales (>= 2.3.6) but it is not going to be installed
 language-pack-gnome-zh-hans-base : Depends: locales (>= 2.3.6) but it is not going to be installed
 language-pack-zh-hans-base : Depends: locales (>= 2.3.6) but it is not going to be installed
 libreoffice-l10n-en-gb : Depends: locales but it is not going to be installed or
                                   locales-all
 libreoffice-l10n-en-za : Depends: locales but it is not going to be installed or
                                   locales-all
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

A loop again.

UPDATED

I tried

sudo apt update

I got

Hit:1 http://au.archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://au.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]     
Get:3 http://au.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]   
Get:4 http://au.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2,384 kB]
Hit:5 https://typora.io ./linux/ InRelease                                     
Hit:6 https://typora.io/linux ./ InRelease                                     
Hit:7 https://dl.google.com/linux/chrome/deb stable InRelease                  
Get:8 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]      
Hit:9 http://ppa.launchpad.net/hluk/copyq/ubuntu focal InRelease               
Get:10 http://au.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [788 kB]
Get:11 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [59.9 kB]
Get:13 http://au.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [274 kB]
Get:14 http://au.archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [712 kB]
Get:15 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [94.1 kB]
Get:16 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [940 B]
Get:17 http://au.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,026 kB]
Get:18 http://au.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [408 kB]
Get:19 http://au.archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [23.6 kB]
Get:20 http://au.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [940 B]
Get:21 http://au.archive.ubuntu.com/ubuntu focal-backports/main amd64 DEP-11 Metadata [8,000 B]
Get:22 http://au.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [30.5 kB]
Hit:12 https://archive.ubuntukylin.com/ukui focal InRelease                    
Fetched 6,146 kB in 5s (1,359 kB/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up-to-date.
W: Conflicting distribution: https://typora.io ./linux/ InRelease (expected ./linux/ but got )

Then I tried

grep -r deb /etc/apt/sources.list /etc/apt/sources.list.d/

I got

/etc/apt/sources.list:# deb cdrom:[Ubuntu 20.04.5 LTS _Focal Fossa_ - Release amd64 (20220831)]/ focal main restricted
/etc/apt/sources.list:deb http://au.archive.ubuntu.com/ubuntu/ focal main restricted
/etc/apt/sources.list:# deb-src http://au.archive.ubuntu.com/ubuntu/ focal main restricted
/etc/apt/sources.list:deb http://au.archive.ubuntu.com/ubuntu/ focal-updates main restricted
/etc/apt/sources.list:# deb-src http://au.archive.ubuntu.com/ubuntu/ focal-updates main restricted
/etc/apt/sources.list:deb http://au.archive.ubuntu.com/ubuntu/ focal universe
/etc/apt/sources.list:# deb-src http://au.archive.ubuntu.com/ubuntu/ focal universe
/etc/apt/sources.list:deb http://au.archive.ubuntu.com/ubuntu/ focal-updates universe
/etc/apt/sources.list:# deb-src http://au.archive.ubuntu.com/ubuntu/ focal-updates universe
/etc/apt/sources.list:deb http://au.archive.ubuntu.com/ubuntu/ focal multiverse
/etc/apt/sources.list:# deb-src http://au.archive.ubuntu.com/ubuntu/ focal multiverse
/etc/apt/sources.list:deb http://au.archive.ubuntu.com/ubuntu/ focal-updates multiverse
/etc/apt/sources.list:# deb-src http://au.archive.ubuntu.com/ubuntu/ focal-updates multiverse
/etc/apt/sources.list:deb http://au.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
/etc/apt/sources.list:# deb-src http://au.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
/etc/apt/sources.list:# deb http://archive.canonical.com/ubuntu focal partner
/etc/apt/sources.list:# deb-src http://archive.canonical.com/ubuntu focal partner
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security main restricted
/etc/apt/sources.list:# deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security universe
/etc/apt/sources.list:# deb-src http://security.ubuntu.com/ubuntu focal-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security multiverse
/etc/apt/sources.list:# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse
/etc/apt/sources.list:# (e.g. netinst, live or single CD). The matching "deb cdrom"
/etc/apt/sources.list:deb https://typora.io ./linux/
/etc/apt/sources.list:# deb-src https://typora.io ./linux/
/etc/apt/sources.list:deb https://typora.io/linux ./
/etc/apt/sources.list:# deb-src https://typora.io/linux ./
/etc/apt/sources.list:deb http://archive.ubuntukylin.com/ukui focal main
/etc/apt/sources.list:# deb-src http://archive.ubuntukylin.com/ukui focal main
/etc/apt/sources.list.d/hluk-ubuntu-copyq-focal.list.save:deb http://ppa.launchpad.net/hluk/copyq/ubuntu focal main
/etc/apt/sources.list.d/hluk-ubuntu-copyq-focal.list.save:# deb-src http://ppa.launchpad.net/hluk/copyq/ubuntu focal main
/etc/apt/sources.list.d/google-chrome.list:deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/hluk-ubuntu-copyq-focal.list:deb http://ppa.launchpad.net/hluk/copyq/ubuntu focal main
/etc/apt/sources.list.d/hluk-ubuntu-copyq-focal.list:# deb-src http://ppa.launchpad.net/hluk/copyq/ubuntu focal main
/etc/apt/sources.list.d/google-chrome.list.save:deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main

Then I tried

apt-cache policy libc6:amd64 libc6:i386 libcrypt1:i386 libcrypt1:amd64

I got

libc6:
  Installed: 2.31-0ubuntu9.9
  Candidate: 2.31-0ubuntu9.9
  Version table:
 *** 2.31-0ubuntu9.9 500
        500 http://au.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.31-0ubuntu9.7 500
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
     2.31-0ubuntu9 500
        500 http://au.archive.ubuntu.com/ubuntu focal/main amd64 Packages
libc6:i386:
  Installed: 2.31-0ubuntu9.9
  Candidate: 2.31-0ubuntu9.9
  Version table:
 *** 2.31-0ubuntu9.9 500
        500 http://au.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages
        100 /var/lib/dpkg/status
     2.31-0ubuntu9.7 500
        500 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages
     2.31-0ubuntu9 500
        500 http://au.archive.ubuntu.com/ubuntu focal/main i386 Packages
libcrypt1:i386:
  Installed: 1:4.4.10-10ubuntu4
  Candidate: 1:4.4.10-10ubuntu4
  Version table:
 *** 1:4.4.10-10ubuntu4 500
        500 http://au.archive.ubuntu.com/ubuntu focal/main i386 Packages
        100 /var/lib/dpkg/status
libcrypt1:
  Installed: 1:4.4.10-10ubuntu4
  Candidate: 1:4.4.10-10ubuntu4
  Version table:
 *** 1:4.4.10-10ubuntu4 500
        500 http://au.archive.ubuntu.com/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status

Then I tried

sudo apt --fix-broken install

I got

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libopencc2 libopencc2-data
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  locales
The following NEW packages will be installed
  locales
0 to upgrade, 1 to newly install, 0 to remove and 0 not to upgrade.
3 not fully installed or removed.
Need to get 0 B/6,592 kB of archives.
After this operation, 17.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
dpkg: error processing package libc6:amd64 (--configure):
 package libc6:amd64 is not ready for configuration
 cannot configure (current status 'half-installed')
Errors were encountered while processing:
 libc6:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

UPDATE---------------------------------------------

I tried

sudo apt reinstall --fix-broken libc6:amd64
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.
 language-pack-en-base : Depends: locales (>= 2.3.6) but it is not going to be installed
 language-pack-gnome-en-base : Depends: locales (>= 2.3.6) but it is not going to be installed
 language-pack-gnome-zh-hans-base : Depends: locales (>= 2.3.6) but it is not going to be installed
 language-pack-zh-hans-base : Depends: locales (>= 2.3.6) but it is not going to be installed
 libreoffice-l10n-en-gb : Depends: locales but it is not going to be installed or
                                   locales-all
 libreoffice-l10n-en-za : Depends: locales but it is not going to be installed or
                                   locales-all
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I tried

/etc/apt/sources.list

I got

bash: /etc/apt/sources.list: Permission denied

I tried

deb https://typora.io/linux ./

I got

Command 'deb' not found, did you mean:

  command 'den' from snap den (1.2.0-0)
  command 'dub' from snap dub (1.19.0)
  command 'edb' from deb edb-debugger (1.0.0-1build3)
  command 'dab' from deb bsdgames (2.17-28build1)
  command 'dub' from deb dub (1.19.0-1build2.1)
  command 'derb' from deb icu-devtools (66.1-2ubuntu2.1)
  command 'debi' from deb devscripts (2.20.2ubuntu2)
  command 'debc' from deb devscripts (2.20.2ubuntu2)
  command 'dex' from deb dex (0.8.0-2)
  command 'dep' from deb go-dep (0.5.4-3ubuntu0.1)
  command 'deb3' from deb quilt (0.65-3)

See 'snap info <snapname>' for additional versions.

I tried to edit

/etc/apt/sources.list

I got

/etc/apt/sources.list: Permission denied

and can not save the read only file.

es flag
Try `sudo apt install --reinstall libc6:amd64`
Someone avatar
my flag
There is a very crucial conflict with the packages on your system. `libc6` is a very important library required by all the system packages in Ubuntu. Try the command suggested by @Jarno and report further. Generally, a very simple solution to issues which include half-configured packages is `dpkg -P` but libc6 is a critical package on your system and is used by many other packages, so removing it may cause other issues. `sudo dpkg --configure -a` give this a try too.
Halona avatar
ye flag
@AlwaysAvailable Hi I already updated the results, could you please help me to check with them?
Halona avatar
ye flag
@jarno Hi Jarno, I updated the results of the command, could you please help me to check with them?
Someone avatar
my flag
Try `sudo aptitude reinstall libc6:amd64`
Halona avatar
ye flag
@AlwaysAvailable Hey I updated the results. It seems a loop again.
nobody avatar
gh flag
`sudo apt update` and `grep -r deb /etc/apt/sources.list /etc/apt/sources.list.d/` also `apt-cache policy libc6:amd64 libc6:i386 libcrypt1:i386 libcrypt1:amd64` please.
Halona avatar
ye flag
@nobody Hi I updated results, please check them.
Someone avatar
my flag
Well, I have got something in my pocket which might be a piece of cake solution to your problem but because of the **risk involved I suggest you listen to @nobody and other folk's views before trying**: `systemctl list-dependencies libc6` review, and stop the crucial one's by `sudo systemctl stop <service_name>` and then `sudo dpkg --configure --force-all libc6:amd64` and then restart the services you closed before by `sudo systemctl start <service_name>`; it might cause further and long terms conflict (**notice I used the 'may' modal**); so try other options first.
es flag
Could you try `sudo apt reinstall --fix-broken libc6:amd64`?
Someone avatar
my flag
If you are trying to reinstall the system them might as well give my command a try
nobody avatar
gh flag
you have to open /etc/apt/sources.list with an editor and change the line with granted rights. Thats not meant as command. `sudo nano /etc/apt/sources .list` https://askubuntu.com/questions/54221/how-to-edit-files-in-a-terminal-with-nano
es flag
It is odd that the system is not going to install "locales" package even if it is a dependency. What does `apt policy locales` give?
Score:0
fk flag

I had a similar problem with apt.

My solution was running sudo apt-get update.

After that apt was working properly!

So try this command and then run sudo apt --fix-broken install

Halona avatar
ye flag
Hi Ivan, I have updated the results when I run the command.
Someone avatar
my flag
Sometimes due to an update/modification in the repository list; some packages are not identified as installed or are considered 3rd party cause of which becomes this error; but that's very specific and does not seem to be applicable in situations such as this
Score:0
gh flag

I give a try.

Please in

/etc/apt/sources.list

change entry

deb https://typora.io/linux ./

to

#deb https://typora.io/linux ./

apt gives a warning about this entry. Then change from mirror-server to main-server

sudo sed -i s,//au.archive,//archive,g  /etc/apt/sources.list

Now we let apt forget what was available on your mirror-sever.

sudo rm -rf /var/lib/apt/lists/*

the same for dpkg.

sudo dpkg --clear-avail

Please check with

sudo ls -al /var/cache/apt/archives/partial/

if this folder is empty. If not remove the content but only the content.

sudo rm /var/cache/apt/archives/partial/*

Now procdeed

sudo apt update && sudo apt -f install

Sidenote: it is always a good idea to have a current backup from important data.

es flag
Oddly the output of `sudo apt update` did also list `Hit:5 https://typora.io ./linux/ InRelease`
es flag
According to my testing the the line to delete in /etc/apt/sources.list is `deb https://typora.io ./linux/` and there is no need to touch line `deb https://typora.io/linux ./`. The former line does not work even if you remove the latter one.
es flag
Even typora.io website does tell to add the latter one: https://typora.io/#linux
es flag
Anyway I think that _typora_ repository is not causing the issue with `apt install`. At least it did not do that as I tested installing _typora_ in 20.04.
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.