• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Arch

Using Makepkg on Arch Linux

How VPS by How VPS
August 8, 2019
in Arch, Uncategorized
0
0
SHARES
32
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Compiling Using Makepkg
  2. Package Faster
  3. Skip Verifying PGP Signature
  4. Want to contribute?


If you use makepkg directly, it somewhat pollutes your system. The base-devel package group must be installed. This way, by default, dependencies needed only to build the package, but not needed to use it, are left installed. This default behavior can be changed, but this involves installing and uninstalling packages and polluting your /var/log/pacman.log.

Refer to this article for understanding and using the AUR in general, including obtaining the PKGBUILD. This doc only shows the steps specific to makepkg, if it is the method you choose to compile a package.

Compiling Using Makepkg

If the base-devel package group is not already installed, you need to install it. If you don’t, makepkg will assume it’s already installed, and if a package in it is required but not installed, it will simply fail rather than install it for you. makepkg itself is part of the pacman package, already installed.

# pacman -S base-devel

You need to run makepkg in the directory with the PKGBUILD, the directory made by git clone. By default, it will download the actual source code, compile the package, and package it.

There are many options for makepkg, including these commonly used ones:

  • -s, --syncdeps : Automatically install missing dependencies required for building and using the package.
    • Note if the PKGBUILD has dependencies on AUR packages, you need to install those first, or have them available in a local repository of your own so it can find them.
  • -r, --rmdeps : If it builds successfully, automatically uninstall dependencies that are no longer needed, including the following:
    • Ones required for building but not using the package.
    • If used without the --install option, ones required for using the package.
  • -i, --install : If it builds successfully, automatically install/upgrade the package.
  • -c, --clean : Automatically delete temporary build files, usually only needed when debugging a build that has gone wrong.

To automatically install/upgrade the package, leave dependencies installed for using the package, and remove dependencies only needed during building, run:

# makepkg -sri

Alternatively, you can choose not to automatically install it, and leave all dependencies installed, so if you package an upgrade someday, they are already installed:

# makepkg -s

You can then either use a Local Repository as explained here, or install the file directly:

# pacman -U <PKGNAME>-<PKGVER>-<PKGREL>-<ARCH>.pkg.tar.xz

Package Faster

By default, makepkg combines an entire package into an archive format; making a .tar.xz file using a single thread for the xz compression.

On multi CPU systems, you can allow xz to use multiple threads by editing /etc/makepkg.conf, and change the following line:

COMPRESSXZ=(xz -c -z -)

You can allow as many threads as you have virtual cores:

COMPRESSXZ=(xz -c -z - --threads=0)

To allow using multiple virtual cores, but not all of them, such as to reduce impact to overall system performance, add a specific number, such as the following:

COMPRESSXZ=(xz -c -z - --threads=21)

Note: Specifying more threads than the number of virtual cores you have will decrease performance.

If you don’t mind the package file being (potentially much) larger, disable compression by editing /etc/makepkg.conf, and change the following line:

PKGEXT='.pkg.tar.xz'

It should look like the following:

PKGEXT='.pkg.tar'

Skip Verifying PGP Signature

It’s recommended to properly verify and add any PGP signaturesused , as explained here in the section “PGP Signature Error”.

However, if you are running makepkg directly, you can give it the --skippgpcheck option to skip verifying the PGP Signature.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

How to Install Apache 2.4 on Arch Linux

Next Post

How To Install Nginx 1.14 On Arch Linux

Next Post

How To Install Nginx 1.14 On Arch Linux

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet