How to fix this error?

I've been receiving this error whenever I used the terminal.

N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://brave-browser-apt-release.s3.brave.com stable InRelease' doesn't support architecture 'i386'
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code

How to fix this?

Hi, and welcome!

This is just a warning, not an error per-se. This appears because the instructions provided on Brave's website are designed to be the same regardless of whether people is using a 32-bit or a 64-bit computer. Because of this, both versions are checked for updates but only one of them is actually compatible with your computer. This is expected and harmless, so you can ignore it.

If you want to remove it, however, you can first run this command on a terminal window:

dpkg --print-architecture

And then update the file at /etc/apt/sources.list.d/brave-browser-release.list:

- deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main
+ deb [arch=amd64 signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main

The arch= option specifies the architecture, which should match the result from the previous command. Here I'm assuming it will be amd64; change it accordingly.


I'm not sure about the other error. It looks like this is the result of some script that runs after an update operation, probably setup by something else that you've installed previously.

3 Likes

Thanks that removed the N message but I don't know how to remove the E messages.

ModuleNotFoundError: No module named 'apt_pkg'

This was shown before those errors.

dpkg: error processing package update-notifier-common (--configure):
installed update-notifier-common package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of update-notifier:
update-notifier depends on update-notifier-common (= 3.192.54.8+zorin2); however:
Package update-notifier-common is not configured yet.

dpkg: error processing package update-notifier (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of zorin-os-desktop:
zorin-os-desktop depends on update-notifier; however:
Package update-notifier is not configured yet.

dpkg: error processing package zorin-os-desktop (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-manager:
update-manager depends on update-notifier; however:
Package update-notifier is not configured yet.

dpkg: error processing package update-manager (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
update-notifier-common
update-notifier
zorin-os-desktop
update-manager

Could you also say a way to solve this?

If you have update problems, open terminal and enter:

sudo dpkg --configure -a

To avoid any typos, just copy and paste the above command into your terminal.

I am receiving the same error.

sudo apt-get -f install && sudo dpkg --configure -a

Output:

Traceback (most recent call last):
File "/usr/lib/update-notifier/package-data-downloader", line 29, in
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
dpkg: error processing package update-notifier-common (--configure):
installed update-notifier-common package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of update-notifier:
update-notifier depends on update-notifier-common (= 3.192.54.8+zorin2); however:
Package update-notifier-common is not configured yet.

dpkg: error processing package update-notifier (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of zorin-os-desktop:
zorin-os-desktop depends on update-notifier; however:
Package update-notifier is not configured yet.

dpkg: error processing package zorin-os-desktop (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-manager:
update-manager depends on update-notifier; however:
Package update-notifier is not configured yet.

dpkg: error processing package update-manager (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
Errors were encountered while processing:
update-notifier-common
update-notifier
zorin-os-desktop
update-manager
E: Sub-process /usr/bin/dpkg returned an error code (1)

See if this works:

cd /var/lib/dpkg
sudo mv info info.bak
sudo mkdir info
sudo apt-get upgrade

(Source: broken packages (update-notifier, update managticer) that disrupts all kind of installation using apt or apt-get or dpkg or even synap - Ask Ubuntu )

Looking up this error online returns a few results that relate to Python. A suggestion that seems common to address this is to re-install the relevant Python package:

sudo apt install python3-apt

If you have you installed or run any scripts, it would be helpful to know in case those have changed something in your system.

2 Likes

I nearly posted the python resolution but held back as not sure if this was the issue. Another possibility is lack of deb.conf.

Thanks it removed the problem.

1 Like

It worked, thanks.

1 Like

I'm really curious about what could've caused this in the first place. I suppose it's a dependency of something else that got uninstalled.

2 Likes

I am also curious. Because a system essential package like that would not be included in the automatically installed list.

1 Like