Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: error: Failed to execute pacman-conf: error: config file /etc/pacman.conf, line  (Read 2455 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

error: Failed to execute pacman-conf: error: config file /etc/pacman.conf, line

The error-message I got was:
Code: [Select]
error: Failed to execute pacman-conf: error: config file /etc/pacman.conf, line 18: All directives must belong to a section.

well, locking at several threads including the Wiki and the linked page don't solve my problem.

I downgraded a package before the error came and let set this package in the "ignore-list", the `IgnorePkg` is also in ` /etc/pacman.conf`,
afterward I upgrade again the package but the "downgrader" don't offer me to delete this from the "ignore-list", I looked in the `/etc/pacman.conf` and there is `IgnorePkg`-field enabled but empty,
my thought was to delete also the `[options]`-line together with empty option,

and this was a mistake because the next option in the line 18 was not recognized as such anymore.

If you want to avoid my own error... check first if around line 12 the line `[options]` is present and enabled like here shown:
Code: [Select]
[options]

Here the whole `/etc/pacman.conf`:
Code: [Select]
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#

# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
[options]
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
#HookDir     = /etc/pacman.d/hooks/
HoldPkg     = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta    = 0.7
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
UseSyslog
Color
CheckSpace
VerbosePkgLists
ParallelDownloads = 4
ILoveCandy

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Artix Linux
# packagers with `pacman-key --populate artix`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The gremlins repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.


#[gremlins]
#Include = /etc/pacman.d/mirrorlist

[system]
Include = /etc/pacman.d/mirrorlist

[world]
Include = /etc/pacman.d/mirrorlist

#[galaxy-gremlins]
#Include = /etc/pacman.d/mirrorlist

[galaxy]
Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the lib32 repositories as required here.

#[lib32-gremlins]
#Include = /etc/pacman.d/mirrorlist

[lib32]
Include = /etc/pacman.d/mirrorlist

# [universe] contains packages not in mainstream Artix or Arch repos,
# maintained by individual Artix devs
[universe]
Server = https://mirror1.artixlinux.org/universe/$arch
Server = https://mirror.pascalpuffke.de/artix-universe/$arch
Server = https://artixlinux.qontinuum.space:4443/universe/os/$arch
Server = https://universe.artixlinux.org/$arch

# Omniverse contains packages from the AUR and Arch [community], some with non-free licenses.
# You *must* agree to their license in order to use them.
# Packages and descriptions: http://omniverse.artixlinux.org/x86_64/
[omniverse]
Server = http://omniverse.artixlinux.org/$arch

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[localrepo]
#SigLevel = Optional TrustAll
#Server = file:///home/user/localrepo

#
# ARCHLINUX
#

#[testing]
#Include = /etc/pacman.d/mirrorlist-arch

[extra]
Include = /etc/pacman.d/mirrorlist-arch

#[community-testing]
#Include = /etc/pacman.d/mirrorlist-arch

[community]
Include = /etc/pacman.d/mirrorlist-arch

#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist-arch

[multilib]
Include = /etc/pacman.d/mirrorlist-arch


Maybe someone insert this notice somewhere with the intent to save time for people make my own mistakes.
Nevertheless, the excursion in the wiki and for-all in the second link permitted me to setup the fastest mirrors for my location.