In this post I go over installing software and some of the challenges involved.

Acquiring Software

The Good

Firstly, I will install Firefox as my browser of choice, open a terminal by clicking the terminal icon in the dock.

[josh@linux-pc]$ sudo pacman -S firefox
...
:: Repository extra
1) libx364 2) libx264-10bit

Enter a number (default=1): (enter for default)
...

Firefox can now be accessed by clicking the Web Browser icon(globe) in the dock and is the defaut web browser. That's all that was required to install it.

The Bad

I use discord once in a while for communication and it isn't provided in the offical Arch respository. There is however a package in the AUR(Arch User Repository). Lets go over how to download and build a package from the AUR.

I usually make an AUR directory in my home directory for building AUR packages. Open a terminal.

[josh@linux-pc ~]$ mkdir AUR

Now we need to find the package we're looking for so search the AUR for "discord".

 

AUR Discord

 

There are several discord packages, we'll just take regular "discord". Download the snapshot.

 

Download Snapshot

 

Before the package can be built we need to make sure all the required programs for building packages are installed on the system.

[josh@linux-pc ~]$ sudo pacman -S --needed base-devel

Once that is complete all the required packages are installed and it does not need to be run again even if other packages are built. The snapshot can now be extracted and package built. Move the snapshot to the AUR directory and extract it.

[josh@linux-pc Downloads]$ mv discord.tar.gz ../AUR
[josh@linux-pc Downloads]$ cd ../AUR
[josh@linux-pc AUR]$ tar -xvzf discord.tar.gz
discord/
discord/.SRCINFO
discord/.gitignore
discord/Discord.desktop
discord/Discord.install
discord/Discord.sh
discord/LICENSE
discord/PKGBUILD
[josh@linux-pc AUR]$ cd discord

Run makepkg to resolve dependencies, build and install the package.

[josh@linux-pc discord]$ makepkg -si
=> Making package: discord 0.0.2-1 (Sun Nov 12 18:39:28 CST 2017)
==> Checking runtime dependencies...
==> Installing missing dependencies...
error: target not found: libc++
==> ERROR: 'pacman' failed to install missing dependencies.

Looks like we are still missing a dependency, if it's available in the default Arch repositories it will be installed automatically but this one isn't. it must also come from the AUR. Search AUR for libc++ download the snapshot, follow the same procedure to build the package.

[josh@linux-pc Downloads]$ mv libc++.tar.gz ../AUR
[josh@linux-pc Downloads]$ cd ../AUR
[josh@linux-pc AUR]$ tar -xvzf libc++.tar.gz
libc++/
libc++/.SRCINFO
libc++/PKGBUILD
[josh@linux-pc AUR]$ cd libc++
[josh@linux-pc libc++]$ makepkg -si

It should install the required dependencies from the official repositories, if available, and attempt to build the package and install it. Ah, we've run in to another problem.

==> Verifying source file signatures with gpg...
llvm-5.0.0.src.tar.xz ... FAILED (unknown public key 0FC3042E345AD05D)
libcxx-5.0.0.src.tar.xz ... FAILED (unknown public key 0FC3042E345AD05D)
libcxxabi-5.0.0.src.tar.xz ... FAILED (unknown public key 0FC3042E345AD05D)
==> ERROR: One or more PGP signatures could not be verified!

Checking the comments of the AUR page a kind person has pointed us to this page and explained what needs to be done. Click "View PKGBUILD" on the AUR page for libc++ and copy the two PGP keys after the line "validpgpkeys=" so we can retrieve them.

 

AUR libcpp

 

Retrieve the gpg keys.

[josh@linux-pc libc++]$ gpg --recv-keys 11E521D646982372EB577A1F8F0871F202119294 B6C8F98282B944E3B0D5C2530FC3042E345AD05D
gpg: key 0FC3042E345AD05D: 2 signatures not checked due to missing keys
gpg: /home/josh/.gnupg/trustdb.gpg: trustdb created
gpg: key 0FC3042E345AD05D: public key "Hans Wennborg <hans@chromium.org>" imported
gpg: key 8F0871F202119294: public key "Tom Stellard <tom@stellard.net>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 2
gpg: imported: 2

Now that we have the keys, we can attempt to build again.

[josh@linux-pc libc++]$ makepkg -si
...
==> Finished making: libc++ 5.0.0-1 (Sun Nov 12 18:53:40 CST 2017)
==> Installing libc++ package group with pacman -U...
[sudo] password for josh:
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (3) libc++-5.0.0-1 libc++abi-5.0.0-1
libc++experimental-5.0.0-1

Total Installed Size: 5.46 MiB

:: Proceed with installation? [Y/n] y
...

Success! Now with the dependencies resolved the discord package can be built.

[josh@linux-pc libc++]$ cd ../discord
[josh@linux-pc discord]$ makepkg -si
...
==> Finished making: discord 0.0.2-1 (Sun Nov 12 18:56:09 CST 2017)
==> Installing package discord with pacman -U...
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) discord-0.0.2-1

Total Installed Size: 141.40 MiB

:: Proceed with installation? [Y/n] y
...

At last! discord is now installed under "Applications", "Internet". You can clean up the files in the AUR directory, they aren't needed anymore unless you want to reinstall a package that was built. This is a good example of the problem solving you sometimes have to do when installing applications in Arch Linux, it's not always as simple as just installing from the repository. This is, however, also a rare case in my experience. Typically all that is required is to download the snapshot and build the package.

 

Discord Desktop

 

The Ugly

To be continued...