Step Up with Arch Linux – Part II

Share

Step Up with Arch Linux – Part II – Install from Arch User Repository (AUR)

When using Arch Linux, you may need to install some software in Arch User Repository (AUR). You could use yaourt to install from AUR easily. But yaourt is also in AUR. This guide is to tell you how to download the source code from AUR, compile it and install it.

First of all you need to search for the package in the internet and take the AUR link from the results. Let’s install codelite package from AUR. So search for codelite package for Arch Linux and goto the AUR(en) link.

2

Now right click on the Download snapshot in the Package Actions menu and copy the link of it.

 3

Now I recommend you to create a temporary directory for AUR installation packages if you haven’t created them already. Use following commands to do so.

$ mkdir ~/temp
$ mkdir ~/temp/AUR

Now go into the created temporary directory.

$ cd ~/temp/AUR

 Now you download the installation script with wget (If you haven’t installed wget already, use # pacman -S wget to install it).

$ wget ‘<paste copied link with Ctrl + Shift + V in here>’

Eg: $ wget ‘https://aur.archlinux.org/cgit/aur.git/snapshot/codelite.tar.gz

4

 

Now extract the downloaded file using following command. You could use ls command to get the downloaded file name.

$ tar -xvf <file to extract>

Eg: $ tar -xvf codelite.tar.gz

5

Now using ls command  extract the files in a new folder.

6

Now go into the extracted folder.

$ cd <folder name>

Eg: $ cd codelite

Now use makepkg command to download and build the installation file. Use -s option with makepkg so it will search for dependencies for the software that you’re going to install and install those dependencies.

$ makepkg -s

7

After finishing, making the package, you can see the built package in current folder.

8

Now we use pacman to install the software which you have just built.

$ sudo pacman -U <package_name.pkg.tar.xz>

Eg: sudo pacman -U codelite*.xz

(Use * for skip typing the entire name of the package or you could type the entire name of the built package)

When you’re installing from AUR, do not use root terminal to make package because makepkg won’t allow you to do it.

If you have ideas to improve this article, please comment them here or send me an email to students.blog@sci.cmb.ac.lk.

 
Tagged : /