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:
Install the binary to a directory included in PATH
:
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
.
- Install
eselect-repository
and Git client:
sudo emerge --ask app-eselect/eselect-repository dev-vcs/git
-
Ensure that the system has added the main Gentoo repository (usually configured by default).
-
Use
eselect-repository
to addruyisdk-overlay
.
sudo eselect repository add ruyisdk git https://github.com/ruyisdk/ruyisdk-overlay.git
- Sync the repository
sudo emaint sync -r ruyisdk
- 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
- The first command will generate the necessary changes to
package.accept_keywords
. - Run
dispatch-conf
and enteru
(use-new) in the interface to accept the changes. - Install the Ruyi package manager.
sudo emerge --ask dev-util/ruyi
Installing via Python Package Manager
The RuyiSDK package manager is now available on PyPI,and can be installed using pip
or other Python package managers.
# If you're using pipx for global installation:
pipx install ruyi
# If you're installing within a virtual environment:
# Assuming the virtual environment is located at /path/to/some/venv
/path/to/some/venv/bin/pip install ruyi
RISC-V users can install ruyi
via pip
, but please note that some Python libraries required by ruyi
do not yet offer precompiled packages for the RISC-V architecture on PyPI. As a result, the Python package manager may attempt to compile these dependencies from source during installation, which can be time-consuming or may fail.
If you encounter issues installing ruyi
on a RISC-V device, we recommend using alternative installation methods.
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