Skip to content

sudo pacman -S snapd: error: target not found: snapd

Hello,

I'm trying to install Visual Studio Code on my laptop, but for some reason the terminal is giving me that error.

Is there any way to fix it? I've already

sudo pacman -Syyu

Everything is already up to date.

Thanks in advance.

0 points3 comments
Open on Reddit
About this post
Posted
Archived
Score
0 · 46% up
Kind
Text
ID
n57qea

Author

16
posts
20
comments
6
media
View profile

3 comments

You are trying to install a package called snapd from the repositories, but the repositories don't have that package. That's the reason it doesn't install and gives an error - the target package is indeed not found in the repos lol

I assume with that you want to install Snap package manager: https://wiki.archlinux.org/title/Snap

That details that you need to build and install snapd package from AUR, Arch User Repository. See info here on how to do that: https://wiki.archlinux.org/title/Arch_User_Repository


However, you are stating that you want to install Visual Studio Code on your laptop, which is already directly available as a package called code in Arch repos, or via other AUR packages: https://wiki.archlinux.org/title/Visual_Studio_Code#Installation

You don't need Snap package manager for Visual Studio Code as you can install it directly. I don't know where you have the instructions to install snapd, but that is absolutely not necessary; and in my opinion, it's better to not install Snap unless you know you need it (and know why).

Also yeah, I strongly suggest to refer to Arch Wiki for various questions instead of other sources, unless there is no answer on Arch Wiki - it basically covers all your bases here lol

14 points

According to the wiki, snapd is available only from the AUR, so you have use an AUR helper or get the package from AUR and use makepkg -si. Out of curiosity though, why not install VS Code from the standard repositories, where it's packaged as code? It's in the Community repository, which is accessible from pacman.

5 points

I recommend you to not use snapd unless you really need it.

You have the package you're searching for on official arch repositories with pacman. And if you want container version of a package, try to get it from flatpak first, as flatpak is officially supported by archlinux (snapd is mainly an Ubuntu thing, flatpak is on almost every distribution).

Finally be aware of the purpose of AUR before using it, it's community driven, so nothing is officially supported or verified and you are the only one able to ckeck that a package installed from AUR is safe.

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.