Sublime text on Arch linux OS
Asked Answered
R

3

6

I'm using

Linux archbios 5.13.6-arch1-1 #1 SMP PREEMPT Thu, 29 Jul 2021 00:21:06 +0000 x86_64 GNU/Linux

operating system.

My problem comes after following the sublime official instructions for Arch. After these steps from sublime official docs, I just need to upgrade the sublime

sudo pacman -Syu sublime-text

I don't understand from where comes this error

sudo pacman -Syu sublime-text
:: Synchronizing package databases...
 core                   136.1 KiB   340 KiB/s 00:00 [##########################] 100%
 extra                 1566.4 KiB  3.00 MiB/s 00:01 [##########################] 100%
 community                5.6 MiB  3.16 MiB/s 00:02 [##########################] 100%
 multilib               149.8 KiB  1248 KiB/s 00:00 [##########################] 100%
 sublime-text is up to date
:: Starting full system upgrade...
error: failed to prepare transaction (package architecture is not valid)
:: package sublime-text-4113-1-aarch64 does not have a valid architecture

I've checked /etc/pacman.conf

#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

[sublime-text]
Server = https://download.sublimetext.com/arch/stable/x86_64
Runty answered 30/7, 2021 at 10:47 Comment(3)
uname thinks you're running an x86_64 system but the message you're seeing is for aarch64 , which is an ARM architecture. The first thing I'd check is that when you followed the instructions you picked the correct repository; it looks like you added the one for ARM builds.Arias
I also mention that, from where this message come???, I've check the /etc/pacman.conf and here the place #SigLevel = Optional TrustAll #Server = file:///home/custompkgs [sublime-text] Server = download.sublimetext.com/arch/stable/x86_64Runty
That I couldn't say as I don't use that particular distro myself. From the file you posted above it indeed looks like it's pointing at the correct one, though.Arias
R
2

Not quit sure, maybe problem is that when you type

pacman -Syu sublime-text // it takes default version for "sublime-text-4113-1-aarch64

but with yay and mention from where works,

yay -S aur/sublime-text-4

with this command it just works

Runty answered 1/8, 2021 at 8:14 Comment(1)
I feel uncomfortable when package managers fail at finding the proper package. This is like an npm level fail.Palpate
O
2

I think I pasted the wrong version into the commandline and now have aarch64 errors also.

Removed the URL reference to aarch64 in the pacman.conf file which fixed half the problem.

Moved the var/lib/pacman/sync files into a backup directory. Re-ran the command:

sudo pacman -Syu sublime-text

FINALLY worked.

Outpoint answered 23/7, 2022 at 3:4 Comment(0)
L
1

I can confirm Lord High Fixer's solution worked for me as well. I accidentally picked the wrong channel for aarch64 at first, then even after removing that channel from /etc/pacman.conf, I would continue getting the "package sublime-text-4113-1-aarch64 does not have a valid architecture" error.

I created a 'backup folder' in /var/lib/pacman/sync and moved sublime-text.db and sublime-text.db.sig into the folder. Ran pacman -Syu sublime-text and it installed correctly.

Leith answered 26/8, 2022 at 14:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.