Arch Linux BasedManjaro

How To Install Pikaur on Manjaro

Install Pikaur on Manjaro

Managing packages on Manjaro becomes significantly easier when you have the right tools at your disposal. Pikaur stands out as one of the most user-friendly AUR helpers available, offering minimal dependencies and a familiar interface that mirrors Pacman’s syntax. This comprehensive guide walks you through installing Pikaur on Manjaro, configuring it for optimal performance, and mastering its essential commands to unlock the full potential of the Arch User Repository.

What is Pikaur?

Overview and Key Features

Pikaur is a command-line AUR helper designed specifically for Arch-based distributions like Manjaro. Built as a Pacman wrapper, it draws inspiration from classic AUR helpers including yaourt, apacman, and pacaur, combining their best features into a modern, efficient package management tool. The Arch User Repository contains thousands of community-maintained packages that aren’t available in Manjaro’s official repositories, and Pikaur makes accessing these packages remarkably straightforward.

What sets Pikaur apart is its thoughtful design philosophy. The tool requires minimal dependencies, keeping your system lean while providing robust functionality. Unlike some AUR helpers that interrupt you constantly during installation, Pikaur allows you to review all PKGBUILDs at once, then builds everything without requiring further user interaction. This batch question mode proves invaluable when installing multiple packages, eliminating the frustration of babysitting lengthy build processes.

Pikaur automatically handles many common installation headaches. It manages untrusted GPG keys, resolves checksum mismatches, and gracefully handles architecture conflicts that would otherwise halt your installation. Before performing system upgrades, it displays unread Arch Linux news, keeping you informed about important changes that might affect your system. Since it uses the same syntax as Pacman, there’s virtually no learning curve for experienced Manjaro users.

Pikaur vs Other AUR Helpers

Choosing an AUR helper often comes down to personal preference and specific needs. Pikaur distinguishes itself from Yay through superior build error handling and better management of dependency quirks. While Yay remains popular for its speed, Pikaur offers more granular control over the build process.

Compared to Paru, another modern AUR helper, Pikaur takes a more conservative approach. Paru includes additional features and Rust-based performance, but Pikaur’s minimal dependency footprint makes it lighter on system resources. If you value simplicity and reliability over extensive feature sets, Pikaur serves you well.

The choice ultimately depends on your workflow. Pikaur excels when you want careful control over package builds, appreciate batch question modes, and prefer an unobtrusive tool that stays out of your way.

Prerequisites Before Installation

System Requirements

Before diving into the installation process, ensure your Manjaro system is current. An outdated system can cause dependency conflicts and build failures that waste your time. You’ll need sudo privileges to install packages and make system changes. A stable internet connection is essential for downloading repositories and dependencies.

Required Packages

The base-devel package group contains essential tools for building software from source. This collection includes make, gcc, and other compilation utilities that makepkg relies on to transform PKGBUILDs into installable packages. While some Manjaro installations include base-devel by default, many minimal installations omit it to reduce system footprint.

Git serves as your gateway to the AUR, allowing you to clone package repositories directly from the Arch User Repository. Without git, you cannot download the Pikaur source files needed for initial installation.

Makepkg, included in base-devel, reads PKGBUILD files and orchestrates the entire build process. It handles dependency resolution, source downloading, compilation, and packaging into formats Pacman understands.

Pre-installation System Update

Updating your system before installing AUR helpers prevents compatibility issues. Run a full system upgrade to ensure all packages match their latest versions. This simple step avoids cryptic build errors caused by outdated libraries or incompatible dependencies.

Step-by-Step Installation Guide

Step 1: Update Your System

Open your terminal and execute:

sudo pacman -Syu

This command synchronizes your package databases and upgrades all installed packages. Pacman will display a list of packages to upgrade. Review the list, then confirm by pressing Y when prompted. The process may take several minutes depending on how many packages need updating and your internet speed.

If the update fails with database errors, try running sudo pacman -Syy to force refresh all package databases, then attempt the upgrade again.

Step 2: Install Prerequisites

Install the necessary build tools:

sudo pacman -S --needed base-devel git

The --needed flag tells Pacman to skip packages already installed at current versions. This saves bandwidth and time by avoiding unnecessary reinstallations. Base-devel includes roughly two dozen packages, so first-time installation may take a few moments.

When prompted about package selection within base-devel, simply press Enter to install all packages in the group. Individual package selection rarely benefits typical users.

Verify git installation by running git --version. You should see output displaying the installed git version number.

Step 3: Clone Pikaur Repository

Navigate to a convenient directory, like your home folder or a dedicated software directory. Then clone the Pikaur AUR repository:

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

Git downloads the repository files into a new directory named “pikaur”. You’ll see progress messages as it receives objects and resolves deltas. The download completes in seconds since the repository is relatively small.

This repository contains the PKGBUILD file, which provides instructions for building Pikaur, along with any necessary patches or additional files.

Step 4: Navigate to Pikaur Directory

Change into the newly created directory:

cd pikaur

List the directory contents with ls to see what files are present. You should see at minimum a PKGBUILD file, which serves as the recipe for building Pikaur. Additional files might include .SRCINFO (package metadata) and any patches or configuration files.

Take a moment to review the PKGBUILD if you’re security-conscious. Open it with nano PKGBUILD or your preferred text editor. While Pikaur is a trusted, widely-used tool, developing the habit of reviewing build scripts protects you from potentially malicious packages in the AUR.

Step 5: Build and Install Pikaur

Execute the build command:

makepkg -fsri

Let’s break down these flags:

  • -f forces makepkg to overwrite existing packages, useful if you’re reinstalling
  • -s installs missing dependencies automatically using Pacman
  • -r removes makedepends (build-only dependencies) after installation
  • -i installs the package immediately after successful build

The build process downloads Pikaur’s source files, compiles them if necessary, and packages everything into a .pkg.tar.zst archive. Then it automatically installs this package using Pacman.

During the build, you’ll see various messages about checking runtime dependencies, downloading sources, and extracting files. Don’t panic if the process seems to pause—some steps take time, especially on older hardware.

If you encounter ValueError errors, try running makepkg -fsi instead, omitting the -r flag. The -r flag occasionally causes issues on certain system configurations, though the makedepends remain installed harmlessly.

Step 6: Verify Installation

Confirm Pikaur installed correctly:

pikaur --version

This displays the installed Pikaur version number. For additional confirmation, run:

pikaur -h

You’ll see Pikaur’s help text listing available commands and options. If both commands execute without errors, congratulations—Pikaur is ready to use.

Post-Installation Configuration

Configuration File Location

Pikaur stores its configuration in ~/.config/pikaur.conf using standard INI format. The file doesn’t exist until Pikaur’s first run, at which point it’s created automatically with sensible default values. This approach keeps your system clean and only creates configuration when actually needed.

Opening Configuration File

Edit the configuration with your preferred text editor:

nano ~/.config/pikaur.conf

Alternatively, use vim, gedit, kate, or any text editor you’re comfortable with. The configuration file divides settings into logical sections marked by brackets.

Important Configuration Options

The [review] section controls how Pikaur handles package review before building. Setting nodiff = yes skips PKGBUILD diff prompts entirely. While this streamlines installations, it reduces security by bypassing code review opportunities. Only enable this setting for packages from sources you absolutely trust.

The [ui] section offers several interface customizations:

  • RequireEnterConfirm defaults to yes, requiring explicit Enter confirmation for actions
  • PrintCommands defaults to no but can be enabled to display all spawned commands for transparency
  • DiffPager offers three modes: always, auto, or never for controlling diff display behavior
  • ReverseSearchSorting defaults to no, controlling search result order
  • GroupByRepo defaults to yes, organizing packages by repository in output

Most users run Pikaur perfectly well with default settings. Customize only when you understand the implications of each change.

Using Pikaur: Basic Commands

Installing Packages

Install AUR packages with:

pikaur -S package-name

Replace “package-name” with the actual package you want. Pikaur searches both official repositories and the AUR, presenting all matches for selection. Use arrow keys to navigate, space to select, and Enter to confirm.

Before building, Pikaur displays the PKGBUILD for review. Take this opportunity to verify the package builds what you expect and doesn’t contain suspicious commands.

Searching for Packages

Search across all repositories:

pikaur -Ss search-term

This mirrors Pacman’s search syntax. For quick searches, simply run:

pikaur search-term

Pikaur searches package names and descriptions, returning matches from official repos and the AUR. Results include package versions, descriptions, and repository sources.

Package Information

View detailed package information:

pikaur -Si package-name

This displays package details including dependencies, optional dependencies, conflicts, and descriptions. Use this before installation to understand what you’re adding to your system.

System Upgrades

Upgrade your entire system, including AUR packages:

pikaur -Syu

Pikaur splits this into separate -Sy (database sync) and -Su (upgrade) operations. It checks official repositories first, then scans for AUR package updates. When AUR packages have updates available, Pikaur lets you manually select which to upgrade using the [M] flag.

Before proceeding with upgrades, Pikaur displays any unread Arch Linux news. Read these announcements carefully—they often contain critical information about manual intervention required for certain updates.

AUR-Specific Operations

Build local PKGBUILDs with AUR dependencies using the -P flag. This proves useful when developing your own packages or testing modified PKGBUILDs.

For command-specific help, Pikaur offers:

  • -Sh for sync operations help
  • -Qh for query operations help
  • -Ph for PKGBUILD operations help
  • -Gh for getpkgbuild operations help

Removing Packages

Remove packages using standard Pacman syntax:

pikaur -R package-name

Since Pikaur wraps Pacman, all removal commands work identically. Add -s to remove dependencies, or -n to remove configuration files.

Common Issues and Troubleshooting

Python Version Compatibility Issues

After major Python interpreter upgrades, Pikaur may fail with errors stating “You have to update pikaur manually”. This occurs because Python packages built against older interpreter versions become incompatible with newer versions.

The solution is straightforward: navigate back to your pikaur directory and rebuild manually. Run makepkg -fsri to rebuild against the current Python version. Alternatively, install pikaur-git from the AUR, which often includes fixes for recent Python updates.

makepkg -r Flag Problems

Some users encounter ValueError exceptions when using the -r flag with makepkg. If this happens during installation, simply rerun the command without that flag:

makepkg -fsi

The makedepends will remain installed, consuming minimal disk space. This workaround reliably bypasses the issue without compromising functionality.

Build Failures

Missing dependencies cause most build failures. Pikaur usually handles these automatically through the -s flag, but occasionally manual intervention is required. Read error messages carefully to identify missing packages.

GPG key issues arise when packages require keys not in your keyring. Pikaur handles these situations intelligently, prompting you to import necessary keys.

Checksum mismatches indicate either download corruption or intentional PKGBUILD modifications. Pikaur guides you through resolving these discrepancies. Never bypass checksum verification without understanding why it failed.

Permission Errors

Never run makepkg as root. The tool explicitly refuses to operate with root privileges for security reasons. Build packages as your regular user, allowing makepkg to request sudo elevation only when necessary for installation.

If you encounter permission errors in your build directory, ensure you own the directory. Run ls -la to check ownership, and chown to correct it if needed.

Pacman Unrecognized Option Errors

Certain Pacman options like --assume-installed may not pass correctly through Pikaur’s wrapper. If you encounter unrecognized option errors, check whether the option you’re using is compatible with both Pikaur and your Pacman version.

For problematic operations, fall back to using Pacman directly for official repository packages, reserving Pikaur for AUR interactions.

Congratulations! You have successfully installed Pikaur. Thanks for using this tutorial for installing Pikaur on Manjaro Linux system. For additional help or useful information, we recommend you check the official Pikaur website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button