• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

makepkg: command not found

by Deepika

“makepkg” is a command line tool for building packages for the Arch Linux package manager, “pacman”. It is used to create a package file (with a “.pkg.tar” extension) from a source code archive, along with the build instructions specified in the PKGBUILD file.

A PKGBUILD file is a shell script that contains the information necessary to build a package, including:

  • Package name, version, and description
  • Source code location and checksums
  • Build dependencies and other required packages
  • Compilation flags and build instructions

By using makepkg, a user can build a package from source code, including downloading and verifying the source code, building the package, and creating the package file. This is useful for:

  • Building packages for systems with limited internet access, since the package and its dependencies can be installed from a local package file.
  • Customizing packages by modifying the PKGBUILD file to include different build options.
  • Creating packages from source code that is not available in the official Arch Linux repository.
Note: When using makepkg, it is important to verify the authenticity of the source code and PKGBUILD file, as malicious code could be included that could compromise the system.

If you encounter the below error while running the command makepkg:

makepkg: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install pacman
Ubuntu apt-get install pacman
Alpine apk add pacman
Arch Linux pacman -S pacman
Kali Linux apt-get install pacman
Fedora dnf install pacman
OS X brew install makepkg
Raspbian apt-get install pacman

makepkg Command Examples

1. Make a package:

# makepkg

2. Make a package and install its dependencies:

# makepkg --syncdeps

3. Make a package, install its dependencies then install it to the system:

# makepkg --syncdeps --install

4. Make a package, but skip checking the source’s hashes:

# makepkg --skipchecksums

5. Clean up work directories after a successful build:

# makepkg --clean

6. Verify the hashes of the sources:

# makepkg --verifysource

7. Generate and save the source information into `.SRCINFO`:

# makepkg --printsrcinfo > .SRCINFO

Filed Under: Linux

Some more articles you might also be interested in …

  1. lnav Command Examples in Linux
  2. i3status: command not found
  3. gh run: View, run and watch recent GitHub Actions workflow runs
  4. ffe: Extract fields from a flat database file and write to another format
  5. sm Command Examples in Linux
  6. How to use “yum downloadonly” to download a package without installing it
  7. sudo: command not found
  8. gcc: Preprocess and compile C and C++ source files, then assemble and link them together
  9. mdadm Command Shows State : active, degraded
  10. “gitlab-ctl” Command Examples

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright