Install Packages in Arch Linux
Pacman
Install packages through the internal package manager Pacman - e.g.:
sudo pacman -S go
sudo pacman -S nodejs npm
Arch User Repository
Arch User Repository, also known as AUR, is a major part of the Arch Linux ecosystem. It’s a community-driven repository for the Arch Linux system that hosts a number of packages outside the official Arch Linux package database.
- Choose your Package, e.g. Github Desktop.
- Click on Download Snapshot and extract the package.
cd
into the package directory and run the following command to execute thePKGBUILD
script:
makepkg
ERROR Messages:
==> ERROR: Cannot find the fakeroot binary.
See Manjaro Wiki
sudo pacman -S --needed base-devel
:: There are 11 members in group base-devel:
:: Repository core
1) autoconf 2) automake 3) binutils 4) bison 5) fakeroot 6) flex 7) gcc 8) m4 9) make 10) patch 11) pkgconf
Enter a selection (default=all): 5
resolving dependencies...
looking for conflicting packages...
Packages (1) fakeroot-1.26-1
Total Download Size: 0.07 MiB
Total Installed Size: 0.14 MiB
==> ERROR: Cannot find the strip binary required for object file stripping.
sudo pacman -S --needed base-devel
:: There are 11 members in group base-devel:
:: Repository core
1) autoconf 2) automake 3) binutils 4) bison 5) fakeroot 6) flex 7) gcc 8) m4 9) make 10) patch 11) pkgconf
Enter a selection (default=all): 3
resolving dependencies...
looking for conflicting packages...
Packages (2) elfutils-0.185-1 binutils-2.36.1-3
Total Download Size: 6.78 MiB
Total Installed Size: 48.04 MiB
Now it works:
makepkg
==> Making package: github-desktop-bin 2.9.4-1 (Monday, November 22, 2021 PM01:14:19)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Downloading GitHubDesktop-linux-2.9.4-linux1.deb...
- Now install the build package with Packman:
sudo pacman -U github-desktop-bin-2.9.4-1-x86_64.pkg.tar.zst
DEBtoArchPackage
Make sure that pkgfile
is installed:
sudo pacman -S pkgfile
Convert *.deb
installer using Debtap:
wget https://github.com/helixarch/debtap/archive/refs/tags/3.4.2.tar.gz
Update
wget https://github.com/helixarch/debtap/archive/refs/tags/3.5.1.tar.gz
Unzip the binary and enter the directory:
tar xzf 3.5.1.tar.gz
cd debtap-3.5.1
./debtap -v
3.5.1
You must run at least once "debtap -u" with root privileges (preferably recently), before running this script:
sudo ./debtap -u
==> Synchronizing pkgfile database...
:: Updating 4 repos...
community is up to date
extra is up to date
core is up to date
multilib is up to date
==> Synchronizing debtap database...
...
==> Generating base group packages list...
==> All steps successfully completed!
Now run the conversion:
./debtap ../../Astrill/astrill-setup-linux64.deb
==> Extracting package data...
==> Fixing possible directories structure differencies...
==> Generating .PKGINFO file...
:: Enter Packager name:
astrill-setup-linux64
*** Creation of .PKGINFO file in progress. It may take a few minutes, please wait...
==> Checking and generating .INSTALL file (if necessary)...
:: If you want to edit .PKGINFO and .INSTALL files (in this order), press (1) For vi (2) For nano (3) For default editor (4) For a custom editor or any other key to continue:
==> Generating .MTREE file...
==> Creating final package...
==> Package successfully created!
==> Removing leftover files...
Now install the *.zst
file using Pacman:
sudo pacman -U astrill-3.9.0-1-x86_64.pkg.tar.zst
WARNING: Your system is missing pixbuf theme engine. Please install package gtk2-engines-pixbuf or gtk2-engines
sudo pacman -S gtk-engines
And I kept getting a few missing files errors that I could solve by copying them (from the unpacked DEB file) to the expected locations:
Failed to set capabilities on file '/usr/Astrill/astrill': No such file or directory
chmod: cannot access '/usr/Astrill/astrill.theme': No such file or directory
chmod: cannot access '/usr/Astrill/astrill.theme': No such file or directory
chmod: cannot access '/usr/Astrill/astrill.theme/assets': No such file or directory
chmod: cannot access '/usr/Astrill/astrill.theme/assets2x': No such file or directory
/tmp/alpm_4PvsCm/.INSTALL: line 53: /usr/Astrill/astrill: No such file or directory
cp: cannot stat '/usr/Astrill/Astrill.desktop': No such file or directory
Now it worked :
sudo pacman -U astrill-3.9.0-1-x86_64.pkg.tar.zst ✔
loading packages...
warning: astrill-3.9.0-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (1) astrill-3.9.0-1
Total Installed Size: 17.91 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring [##############################################] 100%
(1/1) checking package integrity [##############################################] 100%
(1/1) loading package files [##############################################] 100%
(1/1) checking for file conflicts [##############################################] 100%
(1/1) checking available disk space [##############################################] 100%
warning: could not get file information for etc/pm/sleep.d/90_astrill
:: Running pre-transaction hooks...
(1/1) Creating Timeshift snapshot before upgrade...
==> skipping timeshift-autosnap due skipRsyncAutosnap in /etc/timeshift-autosnap.conf set to TRUE.
:: Processing package changes...
(1/1) reinstalling astrill [##############################################] 100%
Testing '/usr/local/Astrill/liblsp64.so':PASSED
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Refreshing PackageKit...
(3/3) Updating the desktop file MIME type cache...
And I am able to start the application from the Desktop shortcut <3
pacseek
pacseek is terminal user interface which allows you to browse and search through the Arch Linux package databases as well as the Arch User Repository.
Installation
git clone https://github.com/moson-mo/pacseek.git
cd pacseek
go build .
sudo mv ./pacseek /usr/bin/pacseek
Add the binary file to your path variable - e.g. ~/.bashrc
or ~/.zshrc
- and update the configuration source ~/.zshrc
:
# pacseek
export PATH=$PATH:/usr/bin/pacseek
Now you can run the interface with:
pacseek