Ricerca nel sito web

Come installare e utilizzare Snap Package Manager su Alma Linux 8


Su questa pagina

  1. Prerequisiti
  2. Installa Snapd
  3. Trova un pacchetto con Snap
  4. Installa un pacchetto con Snap
  5. Elenco Installa pacchetti Snap
  6. Aggiorna un pacchetto con Snap
  7. Rimuovi un pacchetto Snap
  8. Conclusione

Il gestore di pacchetti Snap chiamato anche snapd è un moderno gestore di pacchetti in Linux che consente di installare pacchetti Snap su un'ampia gamma di distribuzioni e versioni di Linux. I pacchetti snap sono autonomi e vengono eseguiti in un ambiente sandbox. Puoi installare i pacchetti Snap tramite la riga di comando o scaricarli dal sito Web come file .snap. Snap è un gestore di pacchetti universale, a distribuzione incrociata e privo di dipendenze. Applicazioni snap impacchettate con tutte le loro dipendenze per l'esecuzione su tutte le principali distribuzioni Linux.

In questo tutorial, ti mostrerò come installare e utilizzare Snap Package Manager su Alma Linux 8.

Prerequisiti

  • Un server che esegue Alma Linux 8.
  • Sul server è configurata una password di root.

Installa Snapd

Per impostazione predefinita, il pacchetto Snapd non è incluso nel repository predefinito di Alma Linux 8. Quindi dovrai installarlo dal repository EPEL.

Innanzitutto, installa il repository EPEL utilizzando il seguente comando:

dnf install epel-release -y

Successivamente, esegui il seguente comando per installare il pacchetto Snapd sul tuo sistema.

dnf install snapd -y

Una volta installato Snapd, avvia e abilita il servizio Snapd utilizzando il seguente comando:

systemctl enable --now snapd.socket
systemctl start --now snapd.socket

Puoi controllare lo stato del servizio Snapd con il seguente comando:

systemctl status snapd.socket

Otterrai il seguente output:

? snapd.socket - Socket activation for snappy daemon
   Loaded: loaded (/usr/lib/systemd/system/snapd.socket; enabled; vendor preset: disabled)
   Active: active (listening) since Mon 2022-02-28 10:30:21 UTC; 10s ago
   Listen: /run/snapd.socket (Stream)
           /run/snapd-snap.socket (Stream)
    Tasks: 0 (limit: 11412)
   Memory: 4.0K
   CGroup: /system.slice/snapd.socket

Feb 28 10:30:21 linux systemd[1]: Starting Socket activation for snappy daemon.
Feb 28 10:30:21 linux systemd[1]: Listening on Socket activation for snappy daemon.

Per verificare la versione di Snapd, esegui il seguente comando:

snap version

Otterrai il seguente output:

snap    2.54.3-1.el8
snapd   2.54.3-1.el8
series  16
rocky   8.5
kernel  4.18.0-348.12.2.el8_5.x86_64

Trova un pacchetto con Snap

Snap fornisce un modo più semplice per trovare il pacchetto desiderato dal repository Snap.

Per elencare tutti i pacchetti Snap disponibili nel repository Snap, eseguire il seguente comando:

snap find

Otterrai un elenco di tutti i pacchetti Snap nel seguente output:

Name                       Version                Publisher              Notes    Summary
spotify                    1.1.77.643.g3c4c6fc6   spotify*               -        Music for everyone
gimp                       2.10.28                snapcrafters           -        GNU Image Manipulation Program
1password                  8.5.0                  1password*             -        1Password - Password Manager and Secure Wallet
code                       f80445ac               vscode*                classic  Code editing. Redefined.
vlc                        3.0.16                 videolan*              -        The ultimate media player
okular                     20.12.3                kde*                   -        Document Viewer
onlyoffice-desktopeditors  7.0.0                  onlyoffice*            -        A comprehensive office suite for editing documents, spreadsheets and presentations
liveforspeed               S3-6T                  mmtrt                  -        Live for Speed (LFS) is a online racing simulator.
bomber                     21.12.2                kde*                   -        Arcade Bombing Game
thunderbird                91.6.1                 canonical*             -        Mozilla Thunderbird email application
phpstorm                   2021.3.2               jetbrains*             classic  PhpStorm
signal-desktop             5.30.0                 snapcrafters           -        Signal Desktop
climate-trail              2.1                    merlijn-sebrechts      -        Surviving The Climate Apocalypse
gitkraken                  8.2.1                  gitkraken*             classic  For repo management, in-app code editing & issue tracking.
krita                      4.4.5                  krita*                 -        Digital Painting, Creative Freedom
vidcutter                  6.0.5.1                ozmartian              -        the simplest + fastest media cutter and joiner
scummvm                    2.5.1                  snapcrafters           -        ScummVM is a program which allows you to run numerous classic graphical point-and-click adventure games and role-playing games
bitwarden                  1.31.3                 bitwarden*             -        Bitwarden
pinta                      2.0.2                  james-carroll          -        Painting made simple!
typora                     1.1.5                  typora                 -        A minimal Markdown reading and writing app
picard                     2.7.3                  metabrainz-apps        -        Picard is the official MusicBrainz audio tagger
jami                       20211222.1.3e5b149     sfljami                -        Jami, a secure, distributed communication software and SIP client
brave                      1.35.103               brave                  -        Browse faster and safer with Brave.
konversation               21.12.1                kde*                   -        IRC client
omniawrite                 1.3.2                  torsten.dittmann       -        OmniaWrite - A text editor engineered for creative writing.
opera                      84.0.4316.21           opera-software*        -        Fast, secure, easy-to-use browser
plexmediaserver            1.25.6.5577-c8bd13540  plexinc*               -        Your media on all your devices.
powershell                 7.2.1                  microsoft-powershell*  classic  PowerShell for every system!

Per trovare un pacchetto specifico, eseguire il seguente comando:

snap find vlc

Questo troverà il pacchetto VLC e altri pacchetti simili come mostrato di seguito:

Name             Version                 Publisher  Notes  Summary
vlc              3.0.16                  videolan*  -      The ultimate media player
mjpg-streamer    2.0                     ogra       -      UVC webcam streaming tool
audio-recorder   3.0.5+rev1432+pkg-7b07  brlin      -      A free audio-recorder for Linux (EXTREMELY BUGGY)
dav1d            0.9.2                   videolan*  -      AV1 decoder from VideoLAN
gridplayer       0.2.1                   vzhd1701   -      Play videos side-by-side
orion-desktop    0.0.10                  keshavnrj  -      Complete torrent client and streamer for Linux Desktop
kycli            0+git.9591d6e           dvlc       -      The command line interface to the unofficialKYC platform.
peerflix         v0.39.0+git1.df28e20    pmagill    -      Streaming torrent client for Node.js
test-streamlink  1.4.1-64-g599f362e      addq1eax   -      test-Streamlink

Installa un pacchetto con Snap

Per installare un pacchetto specifico, eseguire il seguente comando:

snap install vlc

Questo installerà il pacchetto VLC nel tuo sistema.

Per verificare le informazioni sul pacchetto VLC, eseguire il seguente comando:

snap info vlc

Dovresti vedere le seguenti informazioni:

name:      vlc
summary:   The ultimate media player
publisher: VideoLAN*
store-url: https://snapcraft.io/vlc
contact:   https://www.videolan.org/support/
license:   unset
description: |
  VLC is the VideoLAN project's media player.
  
  Completely open source and privacy-friendly, it plays every multimedia file and streams.
  
  It notably plays MKV, MP4, MPEG, MPEG-2, MPEG-4, DivX, MOV, WMV, QuickTime, WebM, FLAC, MP3,
  Ogg/Vorbis files, BluRays, DVDs, VCDs, podcasts, and multimedia streams from various network
  sources. It supports subtitles, closed captions and is translated in numerous languages.
commands:
  - vlc
snap-id:      RT9mcUhVsRYrDLG8qnvGiy26NKvv6Qkd
tracking:     latest/stable
refresh-date: today at 10:32 UTC
channels:
  latest/stable:    3.0.16                      2021-06-28 (2344) 310MB -
  latest/candidate: 3.0.16                      2021-06-28 (2344) 310MB -
  latest/beta:      3.0.17-1-2-g0cc084b032      2022-02-28 (2848) 335MB -
  latest/edge:      4.0.0-dev-18410-g56db9925fc 2022-02-28 (2849) 614MB -
installed:          3.0.16                                 (2344) 310MB -

Per impostazione predefinita, Snap archivia tutti i pacchetti nella directory /var/lib/snapd/snaps/. Puoi elencarli con il seguente comando:

ls /var/lib/snapd/snaps/

Dovresti vedere il seguente output:

core18_2284.snap  snapd_14978.snap  vlc_2344.snap

Elenca Installa i pacchetti Snap

Per elencare tutti i pacchetti Snap installati sul tuo sistema, esegui il seguente comando:

snap list

Otterrai un elenco di tutti i pacchetti installati nel seguente output:

Name    Version   Rev    Tracking       Publisher   Notes
core18  20211215  2284   latest/stable  canonical*  base
snapd   2.54.3    14978  latest/stable  canonical*  snapd
vlc     3.0.16    2344   latest/stable  videolan*   -

Aggiorna un pacchetto con Snap

Per aggiornare il pacchetto, eseguire il seguente comando:

snap refresh vlc

Questo aggiornerà il pacchetto VLC all'ultima versione.

Se vuoi vedere le modifiche recenti apportate da Snap, esegui il seguente comando:

snap changes

Dovresti vedere il seguente output:

ID   Status  Spawn               Ready               Summary
1    Done    today at 10:30 UTC  today at 10:30 UTC  Initialize system state
2    Done    today at 10:31 UTC  today at 10:32 UTC  Install "vlc" snap
3    Done    today at 10:31 UTC  today at 10:31 UTC  Initialize device

Rimuovere un pacchetto snap

Se desideri rimuovere un pacchetto specifico dal tuo sistema, esegui il seguente comando:

snap remove vlc

Questo rimuoverà un pacchetto VLC dal sistema.

Conclusione

In questo post, abbiamo spiegato come installare e utilizzare il gestore di pacchetti Snap su Alma Linux 8. Ora puoi installare e gestire facilmente i pacchetti Snap sul tuo sistema. Non esitate a chiedermi se avete domande.