@@ -3,16 +3,17 @@ package linux
33import (
44 "bytes"
55 "fmt"
6- "github.com/algorandfoundation/nodekit/internal/algod/fallback"
7- "github.com/algorandfoundation/nodekit/internal/system"
8- "github.com/charmbracelet/log"
96 "os"
107 "os/exec"
118 "os/user"
129 "runtime"
1310 "strconv"
1411 "strings"
1512 "text/template"
13+
14+ "github.com/algorandfoundation/nodekit/internal/algod/fallback"
15+ "github.com/algorandfoundation/nodekit/internal/system"
16+ "github.com/charmbracelet/log"
1617)
1718
1819// PackageManagerNotFoundMsg is an error message indicating the absence of a supported package manager for uninstalling Algorand.
@@ -74,9 +75,12 @@ func Install() error {
7475 log .Info ("Installing with apt-get" )
7576 return system .RunAll (append (InstallRequirements (), system.CmdsList {
7677 {"sudo" , "apt-get" , "update" },
77- {"sudo" , "apt-get" , "install" , "-y" , "gnupg2" , "curl" , "software-properties-common" },
78- {"sh" , "-c" , "curl -o - https://releases.algorand.com/key.pub | sudo tee /etc/apt/trusted.gpg.d/algorand.asc" },
79- {"sudo" , "add-apt-repository" , "-y" , fmt .Sprintf ("deb [arch=%s] https://releases.algorand.com/deb/ stable main" , runtime .GOARCH )},
78+ {"sudo" , "apt-get" , "install" , "-y" , "gnupg2" , "curl" },
79+ {"sh" , "-c" , "curl -sL https://releases.algorand.com/key.pub | sudo gpg --dearmor -o /usr/share/keyrings/algorand-keyring.gpg" },
80+ {"sh" , "-c" , fmt .Sprintf (
81+ "echo 'deb [arch=%s signed-by=/usr/share/keyrings/algorand-keyring.gpg] https://releases.algorand.com/deb/ stable main' | sudo tee /etc/apt/sources.list.d/algorand.list" ,
82+ runtime .GOARCH ,
83+ )},
8084 {"sudo" , "apt-get" , "update" },
8185 {"sudo" , "apt-get" , "install" , "-y" , "algorand" },
8286 }... ))
0 commit comments