---
name: "libalpm_errors"
section: "3"
platform: "linux"
package: "pacman"
version: "7.1.0.r9.g54d9411-3"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libalpm_errors"
---

# libalpm\_errors(3)

Error Codes - Error codes returned by libalpm.

## NAME

libalpm\_errors - Error Codes

 \- Error codes returned by libalpm.

## SYNOPSIS

### Enumerations

enum **alpm\_errno\_t** { **ALPM\_ERR\_OK** = 0, **ALPM\_ERR\_MEMORY**, **ALPM\_ERR\_SYSTEM**, **ALPM\_ERR\_BADPERMS**, **ALPM\_ERR\_NOT\_A\_FILE**, **ALPM\_ERR\_NOT\_A\_DIR**, **ALPM\_ERR\_WRONG\_ARGS**, **ALPM\_ERR\_DISK\_SPACE**, **ALPM\_ERR\_HANDLE\_NULL**, **ALPM\_ERR\_HANDLE\_NOT\_NULL**, **ALPM\_ERR\_HANDLE\_LOCK**, **ALPM\_ERR\_DB\_OPEN**, **ALPM\_ERR\_DB\_CREATE**, **ALPM\_ERR\_DB\_NULL**, **ALPM\_ERR\_DB\_NOT\_NULL**, **ALPM\_ERR\_DB\_NOT\_FOUND**, **ALPM\_ERR\_DB\_INVALID**, **ALPM\_ERR\_DB\_INVALID\_SIG**, **ALPM\_ERR\_DB\_VERSION**, **ALPM\_ERR\_DB\_WRITE**, **ALPM\_ERR\_DB\_REMOVE**, **ALPM\_ERR\_SERVER\_BAD\_URL**, **ALPM\_ERR\_SERVER\_NONE**, **ALPM\_ERR\_TRANS\_NOT\_NULL**, **ALPM\_ERR\_TRANS\_NULL**, **ALPM\_ERR\_TRANS\_DUP\_TARGET**, **ALPM\_ERR\_TRANS\_DUP\_FILENAME**, **ALPM\_ERR\_TRANS\_NOT\_INITIALIZED**, **ALPM\_ERR\_TRANS\_NOT\_PREPARED**, **ALPM\_ERR\_TRANS\_ABORT**, **ALPM\_ERR\_TRANS\_TYPE**, **ALPM\_ERR\_TRANS\_NOT\_LOCKED**, **ALPM\_ERR\_TRANS\_HOOK\_FAILED**, **ALPM\_ERR\_PKG\_NOT\_FOUND**, **ALPM\_ERR\_PKG\_IGNORED**, **ALPM\_ERR\_PKG\_INVALID**, **ALPM\_ERR\_PKG\_INVALID\_CHECKSUM**, **ALPM\_ERR\_PKG\_INVALID\_SIG**, **ALPM\_ERR\_PKG\_MISSING\_SIG**, **ALPM\_ERR\_PKG\_OPEN**, **ALPM\_ERR\_PKG\_CANT\_REMOVE**, **ALPM\_ERR\_PKG\_INVALID\_NAME**, **ALPM\_ERR\_PKG\_INVALID\_ARCH**, **ALPM\_ERR\_SIG\_MISSING**, **ALPM\_ERR\_SIG\_INVALID**, **ALPM\_ERR\_UNSATISFIED\_DEPS**, **ALPM\_ERR\_CONFLICTING\_DEPS**, **ALPM\_ERR\_FILE\_CONFLICTS**, **ALPM\_ERR\_RETRIEVE\_PREPARE**, **ALPM\_ERR\_RETRIEVE**, **ALPM\_ERR\_INVALID\_REGEX**, **ALPM\_ERR\_LIBARCHIVE**, **ALPM\_ERR\_LIBCURL**, **ALPM\_ERR\_EXTERNAL\_DOWNLOAD**, **ALPM\_ERR\_GPGME**, **ALPM\_ERR\_MISSING\_CAPABILITY\_SIGNATURES** }\
 libalpm's error type

### Functions

**alpm\_errno\_t** **alpm\_errno** (**alpm\_handle\_t** \*handle)\
 Returns the current error code from the handle.  const char \* **alpm\_strerror** (**alpm\_errno\_t** err)\
 Returns the string corresponding to an error number.

## Detailed Description

Error codes returned by libalpm.

## Enumeration Type Documentation

### enum alpm\_errno\_t

libalpm's error type

**Enumerator**

- ***ALPM\_ERR\_OK***

  No error.

- ***ALPM\_ERR\_MEMORY***

  Failed to allocate memory.

- ***ALPM\_ERR\_SYSTEM***

  A system error occurred.

- ***ALPM\_ERR\_BADPERMS***

  Permmision denied.

- ***ALPM\_ERR\_NOT\_A\_FILE***

  Should be a file.

- ***ALPM\_ERR\_NOT\_A\_DIR***

  Should be a directory.

- ***ALPM\_ERR\_WRONG\_ARGS***

  Function was called with invalid arguments.

- ***ALPM\_ERR\_DISK\_SPACE***

  Insufficient disk space.

- ***ALPM\_ERR\_HANDLE\_NULL***

  Handle should be null.

- ***ALPM\_ERR\_HANDLE\_NOT\_NULL***

  Handle should not be null.

- ***ALPM\_ERR\_HANDLE\_LOCK***

  Failed to acquire lock.

- ***ALPM\_ERR\_DB\_OPEN***

  Failed to open database.

- ***ALPM\_ERR\_DB\_CREATE***

  Failed to create database.

- ***ALPM\_ERR\_DB\_NULL***

  Database should not be null.

- ***ALPM\_ERR\_DB\_NOT\_NULL***

  Database should be null.

- ***ALPM\_ERR\_DB\_NOT\_FOUND***

  The database could not be found.

- ***ALPM\_ERR\_DB\_INVALID***

  Database is invalid.

- ***ALPM\_ERR\_DB\_INVALID\_SIG***

  Database has an invalid signature.

- ***ALPM\_ERR\_DB\_VERSION***

  The localdb is in a newer/older format than libalpm expects.

- ***ALPM\_ERR\_DB\_WRITE***

  Failed to write to the database.

- ***ALPM\_ERR\_DB\_REMOVE***

  Failed to remove entry from database.

- ***ALPM\_ERR\_SERVER\_BAD\_URL***

  Server URL is in an invalid format.

- ***ALPM\_ERR\_SERVER\_NONE***

  The database has no configured servers.

- ***ALPM\_ERR\_TRANS\_NOT\_NULL***

  A transaction is already initialized.

- ***ALPM\_ERR\_TRANS\_NULL***

  A transaction has not been initialized.

- ***ALPM\_ERR\_TRANS\_DUP\_TARGET***

  Duplicate target in transaction.

- ***ALPM\_ERR\_TRANS\_DUP\_FILENAME***

  Duplicate filename in transaction.

- ***ALPM\_ERR\_TRANS\_NOT\_INITIALIZED***

  A transaction has not been initialized.

- ***ALPM\_ERR\_TRANS\_NOT\_PREPARED***

  Transaction has not been prepared.

- ***ALPM\_ERR\_TRANS\_ABORT***

  Transaction was aborted.

- ***ALPM\_ERR\_TRANS\_TYPE***

  Failed to interrupt transaction.

- ***ALPM\_ERR\_TRANS\_NOT\_LOCKED***

  Tried to commit transaction without locking the database.

- ***ALPM\_ERR\_TRANS\_HOOK\_FAILED***

  A hook failed to run.

- ***ALPM\_ERR\_PKG\_NOT\_FOUND***

  Package not found.

- ***ALPM\_ERR\_PKG\_IGNORED***

  Package is in ignorepkg.

- ***ALPM\_ERR\_PKG\_INVALID***

  Package is invalid.

- ***ALPM\_ERR\_PKG\_INVALID\_CHECKSUM***

  Package has an invalid checksum.

- ***ALPM\_ERR\_PKG\_INVALID\_SIG***

  Package has an invalid signature.

- ***ALPM\_ERR\_PKG\_MISSING\_SIG***

  Package does not have a signature.

- ***ALPM\_ERR\_PKG\_OPEN***

  Cannot open the package file.

- ***ALPM\_ERR\_PKG\_CANT\_REMOVE***

  Failed to remove package files.

- ***ALPM\_ERR\_PKG\_INVALID\_NAME***

  Package has an invalid name.

- ***ALPM\_ERR\_PKG\_INVALID\_ARCH***

  Package has an invalid architecture.

- ***ALPM\_ERR\_SIG\_MISSING***

  Signatures are missing.

- ***ALPM\_ERR\_SIG\_INVALID***

  Signatures are invalid.

- ***ALPM\_ERR\_UNSATISFIED\_DEPS***

  Dependencies could not be satisfied.

- ***ALPM\_ERR\_CONFLICTING\_DEPS***

  Conflicting dependencies.

- ***ALPM\_ERR\_FILE\_CONFLICTS***

  Files conflict.

- ***ALPM\_ERR\_RETRIEVE\_PREPARE***

  Download setup failed.

- ***ALPM\_ERR\_RETRIEVE***

  Download failed.

- ***ALPM\_ERR\_INVALID\_REGEX***

  Invalid Regex.

- ***ALPM\_ERR\_LIBARCHIVE***

  Error in libarchive.

- ***ALPM\_ERR\_LIBCURL***

  Error in libcurl.

- ***ALPM\_ERR\_EXTERNAL\_DOWNLOAD***

  Error in external download program.

- ***ALPM\_ERR\_GPGME***

  Error in gpgme.

- ***ALPM\_ERR\_MISSING\_CAPABILITY\_SIGNATURES***

  Missing compile-time features.

## Function Documentation

### alpm\_errno\_t alpm\_errno (alpm\_handle\_t \* handle)

Returns the current error code from the handle.

**Parameters**

*handle* the context handle

**Returns**

the current error code of the handle

References **alpm\_errno()**.

Referenced by **alpm\_errno()**.

### const char \* alpm\_strerror (alpm\_errno\_t err)

Returns the string corresponding to an error number.

**Parameters**

*err* the error code to get the string for

**Returns**

the string relating to the given error code

References **alpm\_strerror()**.

Referenced by **alpm\_strerror()**.

## Author

Generated automatically by Doxygen for libalpm from the source code.
