This section describes how to install Guix from a self-contained tarball providing binaries for Guix and for all its dependencies. This is often quicker than installing from source, described later (see 从 Git 构建).
Important: This section only applies to systems without Guix. Following it for existing Guix installations will overwrite important system files.
Some GNU/Linux distributions, such as Debian, Ubuntu, and openSUSE provide Guix through their own package managers. The version of Guix may be older than d108a7a but you can update it afterwards by running ‘guix pull’.
We advise system administrators who install Guix, both from the installation
script or via the native package manager of their foreign distribution,
to also regularly read and follow security notices, as shown by
guix pull
.
For Debian or derivatives such as Ubuntu or Trisquel, call:
sudo apt install guix
Likewise, on openSUSE:
sudo zypper install guix
If you are running Parabola, after enabling the pcr (Parabola Community Repo) repository, you can install Guix with:
sudo pacman -S guix
The Guix project also provides a shell script, guix-install.sh, which automates the binary installation process without use of a foreign distro package manager5. Use of guix-install.sh requires Bash, GnuPG, GNU tar, wget, and Xz.
The script guides you through the following:
As root, run:
# cd /tmp # wget https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh # chmod +x guix-install.sh # ./guix-install.sh
The script to install Guix is also packaged in Parabola (in the pcr repository). You can install and run it with:
sudo pacman -S guix-installer sudo guix-install.sh
注: By default, guix-install.sh will configure Guix to download pre-built package binaries, called substitutes (see substitutes), from the project’s build farms. If you choose not to permit this, Guix will build everything from source, making each installation and upgrade very expensive. See 关于信任二进制文件 for a discussion of why you may want to build packages from source.
To use substitutes from
bordeaux.guix.gnu.org
,ci.guix.gnu.org
or a mirror, you must authorize them. For example,# guix archive --authorize < \ ~root/.config/guix/current/share/guix/bordeaux.guix.gnu.org.pub # guix archive --authorize < \ ~root/.config/guix/current/share/guix/ci.guix.gnu.org.pub
When you’re done installing Guix, see 设置应用程序 for extra configuration you might need, and 入门 for your first steps!
注: 二进制安装包可以通过在Guix源代码树里运行下面这些命令来重现和验证:
make guix-binary.系统.tar.xz... 这个命令会执行:
guix pack -s 系统 --localstatedir \ --profile-name=current-guix guixSee Invoking
guix pack
,了解这个方便的工具。
Should you eventually want to uninstall Guix, run the same script with the --uninstall flag:
./guix-install.sh --uninstall
With --uninstall, the script irreversibly deletes all the Guix files, configuration, and services.