Apt update throws 'doesn't support architecture i386' messages

Everytime I run apt update I get these messages at the end of output

All packages are up to date.
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://repo.pureos.net/pureos crimson InRelease' doesn't support architecture 'i386'
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://repo.pureos.net/pureos crimson-security InRelease' doesn't support architecture 'i386'
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://repo.pureos.net/pureos crimson-updates InRelease' doesn't support architecture 'i386'

Anyone know why these are showing up? I think it might have something to do with residual config junk from following this howto

1 Like

Definitely, considering x86 support for 32-bit packages were dropped a long time ago. Crimson is based on Bookworm, not Buster.

I found a similar question on Ask Ubuntu here.

I removed i386-linux-gnu.conf from /etc/ld.so.conf.d/, ran sudo ldconfig.
Also removed unused files from /etc/apt/sources.list.d/ and zapped the cache with sudo rm -rf /var/lib/apt/lists/* but the issues persists.

1 Like

As a test I moved everything in /etc/apt/sources.list.d/ to an outside temp dir, and re-ran sudo apt update.

Same issue, so I’m confident the culprit is in that directory.

1 Like

Looking through the other topic, it mentions a /srv/{$DISTRIBUTION}i386 directory, so that may be lingering from your chroot installation. It has its own /etc/apt/sources.list that may be conflicting with the package manager.

Everything in /srv/ except for www dir was removed a long while ago, must be lingering somewhere else.

1 Like

Okay, what does cat /etc/apt.sources.list print?

deb http://repo.pureos.net/pureos/ crimson main
deb http://repo.pureos.net/pureos/ crimson-security main
deb http://repo.pureos.net/pureos/ crimson-updates main
1 Like

The only idea I have left, other than reinstalling PureOS, is retracing every executed command from the how-to in reverse chronological order.

Does

sudo dpkg-query --list | grep :i386

give any lines of output?

1 Like

Ah, excellent idea.

$ sudo dpkg-query --list | grep i386
ii  libc6-dev-i386                          2.36-9+deb12u7                       amd64        GNU C Library: 32-bit development libraries for AMD64
ii  libc6-i386                              2.36-9+deb12u7                       amd64        GNU C Library: 32-bit shared libraries for AMD64

I purged both of those packages and dependencies using apt, the ran autoremove to gut more cruft.

Ran sudo apt update again but same error. :man_shrugging:

1 Like

After you have verified that you have no installed packages related to the i386 architecture, you can look at and set architectures. Specifically:

The following should list your system architecture. It should not say i386.

dpkg --print-architecture

The following should list any foreign architectures

dpkg --print-foreign-architectures

If you have i386 listed and you don’t have anything installed of that architecture ( see your previous dpkg-query commands … but, just in case, also “dpkg --get-selections | grep i386” ), you can try removing i386 as a foreign architecture:

sudo dpkg --remove-architecture i386

3 Likes

Thanks, here’s the output of the suggested commands. Resolved the issue, thanks!

seth@mini:~$ dpkg --print-architecture
amd64
seth@mini:~$ dpkg --print-foreign-architectures
i386
seth@mini:~$ dpkg --get-selections | grep i386
seth@mini:~$ sudo dpkg --remove-architecture i386
[sudo] password for seth: 
seth@mini:~$ sudo apt update
Hit:1 https://updates.signal.org/desktop/apt xenial InRelease
Ign:2 https://repo.vivaldi.com/stable/deb stable InRelease                                                                              
Hit:3 https://repo.vivaldi.com/stable/deb stable Release                                                                                
Hit:5 http://download.opensuse.org/repositories/home:/stevenpusser:/palemoon-GTK3/Debian_11  InRelease                                  
Get:6 http://repo.pureos.net/pureos crimson InRelease [9,641 B]                           
Get:7 http://repo.pureos.net/pureos crimson-security InRelease [4,753 B]        
Hit:8 https://brave-browser-apt-release.s3.brave.com stable InRelease           
Hit:9 https://apt.enpass.io stable InRelease  
Get:10 http://repo.pureos.net/pureos crimson-updates InRelease [8,746 B]
Fetched 23.1 kB in 2s (15.4 kB/s)    
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
2 Likes

Looks as if Privacy2 has solved this for you but note that you butchered the grep command that I gave you. In this case the difference in output was too small to be a concern, so it didn’t cause a problem. (Neither grep command is really correct. The correct way would be to match on the actual architecture field but that’s too much like hard work when on a typical system these days there isn’t much i386 stuff.)

1 Like

I don’t use too much awk these days, but it does make these things easier:

    dpkg-query --list | awk '{if ($4=="i386") print $0;}'

[About 25 years ago, I got bit hard by awk’s 1024-character line limit and switched to perl. I eventually switched to python. Sometimes, though, an awk 1-liner is the best solution.]

It turns out that the incorrect grep or the actual architecture filter gets the same subset for me … and it’s not really that small

   privacy2@darkstar:~$ dpkg-query --list | awk '{if ($4=="i386") print $0;}'  | wc
   32     303    4902
2 Likes

grep :386 didn’t find anything so I dropped the semicolon, which did.

2 Likes

I think that’s because you had no i386 architecture packages. So you could have proceeded directly to eliminating i386 as per Privacy2’s instructions.

Even though your grep without the colon listed two packages, those are amd64 architecture packages.

3 Likes

That makes sense.

This exercise was a learning experience for me. Hopefully documenting it will help others with the same issue.

2 Likes

irvinewade’s post and your quote have a colon.

Unescaped semicolons split a line into multiple commands.

2 Likes

I tried escaping it with a backslash too and didn’t notice any difference.

Using kitty terminal with bash shell.

1 Like