Подключить aur arch linux

How to install AUR packages (manually + helpers)

The Arch Linux repositories are one of the most complete in all of Linux. If a program is not available in the official Arch Linux repository, it should be available in the Arch User Repository or AUR. So, this post will teach you how to install AUR packages both manually and with some helping program.

INTRODUCTION

So, if a package is available for Linux, it is unlikely you will not find it in the AUR. Many Arch users say that the AUR is one of the main reasons they use Arch Linux. If you use Arch Linux or you are about to move to Arch Linux, you will have to use the AUR sooner or later. However, installing packages from the AUR seems to be complicated if you have never done it before. But I will try to present the process in the easiest way possible.

In the first part of this post, I will show you how to install AUR packages manually. Then, in the second part, you will learn how to use some AUR helpers that simplify and automate the installation process. There are several helpers available. In the video above, I showed how to install and use Yaourt, and aurman. But both these programs are discontinued now. So, in this post, I will show you how to install and use yay, yet another yogurt. The video tutorial showing yay is at the end of this post.

Before we start I would like to warn you that all AUR packages are user-produced content, so use them at your own risk.

Prerequisites

To install AUR packages, you need to have some building programs on your system to compile a program. You will also need the git program to download the source code of the AUR packages. To install all the required packages, run the following command:

sudo pacman -S --needed base-devel git 

In addition, I also recommend enabling parallel compiling on your system to improve the compiling speed. To do that, open the file /etc/makepkg.conf .

Читайте также:  Linux install driver tar

It is a very large file but if you press the combination CTRL + W, you can search for a term MAKEFLAGS .

Search for the term MAKEFLAGS

So, most likely you will have a value of -j2 , which means to use 2 threads of the processor. But if your processor has more than two threads, you can replace -j2 with -j$(nproc) . The variable $(nproc) will define a number of available threads in your processor automatically.

Improving the compilation time by enabling parallel compiling

Then, press CTRL+O to save the changes and CTRL+X to exit.

After that, you should be able to install AUR packages without problems.

Manual Installation

To install a program from AUR manually, you need to perform a few steps. Basically, you have to do the following:

  1. Find the package in the AUR.
  2. Clone the repository.
  3. Check the PKGBUILD file.
  4. Compile and install the program.

1. Find the package in the AUR

On Arch Linux website, you need to go to the AUR section. and search for the package you are about to install. For example, I will search for Spotify. Spotify is not in the official repository of Arch Linux because it is proprietary software.

Search for spotify on the AUR page

Then, you will see all the information about the program on the next screen. To install an AUR package, you will need to copy the link in Git Clone URL.

Spotify details on the AUR page

2. Clone the repository

After doing that, it is necessary to clone the repository using git . However, I recommend creating a dedicated folder for this type of programs. For example, I created the Programs folder where I compile all the non-official program. Next, enter this folder and clone the repository of the program you selected earlier (Spotify in my case)”

git clone htps://aur.archlinux.org/spotify.git 

Downloading the spotify files using git

3. Check the PKGBUILD file.

After the cloning is finished, a new folder containing the program code will be created. In this case, it is called spotify. Enter it and list its contents with the command ls . In that folder, you should see the PKGBUILD file.

Access to the downloaded folder

You can open it with nano , explore its content and edit it if necessary. You can learn about PKGBUILD format at the Arch Linux Wiki.

PKGBUILD page on the Arch wiki

4. Compile and install the program.

After that, you can start compiling it by running this command in the program directory:

Install a AUR package manually

Depending on the package, it can take quite some time. Next, you have to type your password to install the program.

No errors on the installation

Now, the program is installed and you can open the program from the main menu.

Читайте также:  Best image viewers linux

This way you can install any program from the AUR. As you can see, the process is quite simple, it all comes down to cloning the repository, accessing the folder, verifying the PKGBUILD file and finally, starting the installation.

Install AUR Packages using a helper

There are several AUR helpers available. You can see the full list at this page of Arch Linux Wiki. The installation procedure for these helpers is the same as manual installation from the AUR shown above. I will show how to install yay. It is recommended by the developer of aurman, which I used before, and it is also a recommended helper on Manjaro website. I also liked it after I tested it.

To start installing it, find the git URL of yay in the AUR webpage and clone the repository:

git clone https://aur.archlinux.org/yay.git 

Now, enter the downloaded folder, build and install the program.

Now, yay is available for use. For example, to search for a program in the AUR, use this command:

If you already know that package name, you can install it right away with the -S option:

You can also use yay to search both the AUR and official repositories with -Ss option.

Finally, to upgrade all the packages, use this command.

As you can see from these commands yay uses the same syntax as in pacman. You can discover all available options of yay with the man command:

I hope you will enjoy using yay.

CONCLUSION

The AUR is a very large source of packages for Arch Linux. It should satisfy the needs of any Linux user. If you were unsure how to use the AUR, I hope you are more confident now as you know how to install AUR packages either manually or with some a helper program such as yay.

Average Linux UserFollow I am the founder of the Average Linux User project, which is a hobby I work on at night. During the day I am a scientist who uses computers to analyze genetic data.

Источник

Как пользоваться AUR в Arch Linux

Если вы используете Arch Linux или дистрибутив на основе Arch, вы наверно слышали про AUR. Узнайте, что такое AUR и как использовать AUR в Arch Linux.

Что такое AUR

Репозиторий пользователей Arch (AUR) — это место, где вы можете найти программное обеспечение, которое размещается и сопровождается пользователями, оно не тестировалось создателями Arch Linux. Благодаря этому вы можете получить доступ к большему количеству программного обеспечения, которого нет в официальных репозиториях.

Читайте также:  Узнать версию docker linux

aur

Как пользоваться AUR в Arch Linux

Есть два способа получить доступ к программному обеспечению AUR. Большинство людей предпочитают пользоваться помощниками AUR , которые работают аналогично пакетному менеджеру Arch Pacman. Такой подход автоматизирует извлечение и сборку исходного кода из AUR при использовании знакомых команд. Кроме того, вы можете загрузить пакет прямо из AUR и скомпилировать его вручную.

Установка помощника YAY

Вы можете использовать множество помощников AUR. Yay вероятно самый популярный сегодня, поэтому в этой статье мы остановимся на нем.

Установите необходимые инструменты и git, если они еще не установлены в вашем дистрибутиве:

sudo pacman -S --needed base-devel git

git

git clone https://aur.archlinux.org/yay.git

Использование YAY для установки пакетов AUR

Yay использует синтаксис, аналогичный Pacman. Чтобы вы могли легко установить пакеты AUR, используйте команду:

Например, чтобы установить Google Chrome, вы можете использовать:

Чтобы найти пакет в AUR и официальных репозиториях, используйте флаг -Ss, как показано ниже

Yay google

Чтобы обновить все пакеты из AUR и официальных репозиториев, используйте флаг -Syu.

Что хорошо в помощниках AUR, таких как yay, так это то, что они также автоматически обрабатывают зависимости. Это дополнительные функции, необходимые для всего, что вы пытаетесь установить, в противном случае вам пришлось бы искать и устанавливать самостоятельно.

Удаление пакетов AUR

Чтобы удалить все что было установлено, вам придется использовать -R параметр, но лучше, если вы выберете -Rns , который лучше справляется с очисткой. Например, чтобы удалить Google Chrome:

Вы также можете удалить лишние пакеты и любые остатки от прошлых установок с помощью yay с помощью:

yay -Yc

Если по какой-то причине вам не нравится yay или вы не хотите его использовать, вы также можете использовать другие помощники AUR такие, как aurutils, aura, pacaur, pakku, pamac, pikaur и trizen.

Управление пакетами AUR с помощью менеджера Pamac

Чтобы установить pamac, используйте команду:

После установки вы можете запустить приложение «Добавить / удалить программное обеспечение» в меню приложения.

Pamac

Щелкните значок и перейдите в раздел «Настройки». В разделе «AUR» включите переключатель, чтобы включить поддержку AUR.

Pamac AUR

Теперь вы можете искать пакеты AUR и устанавливать / удалять их.

Опасности AUR

С AUR вы можете найти практически любые приложения. Однако вы должны иметь в виду, что программное обеспечение в репозитории AUR не было тщательно протестировано. В некоторых случаях пакет может быть не установлен (из-за отсутствия зависимостей / ошибки gpg, отсутствующих файлов и т. д.) Или вызвать проблемы в вашей системе. Всегда лучше перепроверить перед установкой чего-либо из AUR.

Если вы только начинаете работать с Arch Linux, вы можете сначала познакомиться с Pacman, а не с AUR.

Источник

Оцените статью
Adblock
detector