Skip to main content

Installation

Let's begin with the installation of the RuyiSDK package manager.

This document uses ~ to represent the home directory of the current regular user, and /home/foo as an example of the absolute path to the home directory when necessary.

Installing Using Precompiled Binaries

Currently, the RuyiSDK package manager tool provides precompiled binaries for Linux systems in three architectures: amd64, arm64, and riscv64. It does not depend on the system Python, making it widely applicable.

These binaries are released on both GitHub Release and the ISCAS mirror site:

Using the ISCAS mirror as an example, the installation process is described below. First, run uname -m to check the system architecture and download the corresponding binary.

If the output is x86_64:

$ wget 

If the output is aarch64:

$ wget 

If the output is riscv64:

$ wget 

You can visit the RuyiSDK mirror for the latest binaries. You can also find them on GitHub releases.

The following example assumes the x86_64 architecture. Grant execution permissions to the downloaded binary:

$ chmod +x ./ruyi.amd64

Install the binary to a directory included in PATH:

$ sudo cp -v ruyi.amd64 /usr/local/bin/ruyi

If your PATH includes the ~/.local/bin/ directory, installing ruyi to ~/.local/bin/ruyi may be a more recommended choice. Installation and removal in this directory do not require superuser privileges.

Note that the binary file must be named ruyi.

Installing Via the System Package Manager

Arch Linux

Currently, Arch Linux users can install and uninstall the Ruyi package manager using the system package manager. Compared to installing with precompiled binaries, this method offers more convenient maintenance and better performance by utilizing the system Python.

To install from the AUR, using yay as an example, note that a regular user should be used:

$ yay -S ruyi

To install from the Arch Linux CN repository, add the following configuration using the ISCAS open-source mirror as an example:

[archlinuxcn]
Server = https://mirror.iscas.ac.cn/archlinuxcn/$arch

Install using pacman:

$ sudo pacman -Sy
$ sudo pacman -S ruyi

Gentoo Linux

Gentoo Linux users can follow the steps below to install and configure the Ruyi package manager (ruyi) using the officially provided ruyisdk-overlay.

  1. Install eselect-repository and Git client:
sudo emerge --ask app-eselect/eselect-repository dev-vcs/git
  1. Ensure that the system has added the main Gentoo repository (usually configured by default).

  2. Use eselect-repository to add ruyisdk-overlay.

sudo eselect repository add ruyisdk git https://github.com/ruyisdk/ruyisdk-overlay.git
  1. Sync the repository
sudo emaint sync -r ruyisdk
  1. Accept testing keywords (Unmask)

The ebuild for Ruyi is marked as a testing version (~amd64), and needs to be unmasked before installation.

sudo emerge dev-util/ruyi --autounmask-write --autounmask
sudo dispatch-conf
  1. The first command will generate the necessary changes to package.accept_keywords.
  2. Run dispatch-conf and enter u (use-new) in the interface to accept the changes.
  3. Install the Ruyi package manager.
sudo emerge --ask dev-util/ruyi

Verifying Your Installation

$ ruyi version

The command should run successfully and print version and Copyright information. If it fails, check your system environment or retry the installation.

Getting Started

At this point, the Ruyi package manager has been successfully installed on your system. You can learn how to use it from the help information provided by Ruyi itself or continue reading this document.

To list the help information:

$ ruyi --help