Pacman deleted, butno pacman-key either, nor makepkg

Hi,

Dear community, I read this post, and it doesn’t not succeed for pacman-key fails too. I downloaded the script, made it executable… and it calls on stuff I don’t have:

./pacman-key: ligne 32: /usr/share/makepkg/util/message.sh: Aucun fichier ou dossier de ce type
./pacman-key: ligne 33: /usr/share/makepkg/util/parseopts.sh: Aucun fichier ou dossier de ce type
./pacman-key: ligne 545: parseopts : commande introuvable
warning: config file /etc/pacman.conf, line 12: directive ‘UseDelta’ in section ‘options’ not recognized.

I can not reinstall the system, I need a fully static solution that does not require any compiling. Can you help ?

1 Like

Use pacman-static: https://pkgbuild.com/~morganamilo/pacman-static/x86_64/bin/pacman-static

After downloading:

sudo ./pacman-static -S pacman

For future reference, you should consider not deleting pacman:wink:

1 Like

I did just what you advised before:

wget https://pkgbuild.com/
~morganamilo/pacman-static/x86_64/bin/pacman-
static
chmod +x pacman-static
sudo ./pacman
-static -S pacman

And it said:

]> sudo ./pacman-static -S pacman
warning: config file /etc/pacman.conf, line 12: directive ‘UseDelta’ in section ‘options’ not recognized.
resolving dependencies…
looking for conflicting packages…
Packages (2) pacman-mirrorlist-20230410-1 pacman-6.0.2-7
Total Installed Size: 4.77 MiB
:: Proceed with installation? [Y/n] Y
error: no servers configured for repository: core
(0/2) checking keys in keyring (1/2) checking keys in keyring (2/2) checking keys in keyring
warning: Public keyring not found; have you run ‘pacman-key --init’?
downloading required keys…
error: keyring is not writable
error: keyring is not writable
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.

Then I tried downloading and using pacman-key, thus producing the error message I provided in the first message.

Did you delete your mirrorlist?

Download the packages manually and then install them with pacman-static -U

It looks like you did more than just delete pacman. Did you delete the entirety of /etc/pacman.d?

I do not know. Obviously I did not deleted pacman willingly, I wanted to get rid of something and gave my consent automatically as I was struggling with something and tried out a few solutions. And it did away with pacman and other stuff, like gimp.

yes, but which ones :sweat_smile: ?!
Can I get a list of dependencies not already installed so I download them individually ?

Look at the bottom of your /var/log/pacman.log and see what you removed.

Here you go:

[2023-06-04T18:21:35+0200] [PACMAN] Running ‘pacman -Syu’
[2023-06-04T18:21:35+0200] [PACMAN] synchronizing package lists
[2023-06-04T18:21:36+0200] [PACMAN] starting full system upgrade
[2023-06-04T18:22:21+0200] [PACMAN] Running ‘pacman --remove -c -s -u – yay’
[2023-06-04T18:22:22+0200] [ALPM] transaction started
[2023-06-04T18:22:22+0200] [ALPM] removed yay (12.0.4-1)
[2023-06-04T18:22:22+0200] [ALPM] transaction completed
[2023-06-04T18:22:22+0200] [ALPM] running ‘30-systemd-update.hook’…
[2023-06-04T18:22:25+0200] [PACMAN] Running ‘pacman --remove -c -s -u – welcome’
[2023-06-04T18:22:26+0200] [ALPM] transaction started
[2023-06-04T18:22:26+0200] [ALPM] removed welcome (3.63-1)
[2023-06-04T18:22:26+0200] [ALPM] transaction completed
[2023-06-04T18:22:26+0200] [ALPM] running ‘30-systemd-update.hook’…
[2023-06-04T18:22:26+0200] [ALPM] running ‘update-desktop-database.hook’…
[2023-06-04T18:22:39+0200] [PACMAN] Running ‘pacman --remove -c -s -u – endeavorous-theming’
[2023-06-04T18:22:52+0200] [PACMAN] Running ‘pacman --remove -c -s -u – endeavorous’
[2023-06-04T18:22:56+0200] [PACMAN] Running ‘pacman --remove -c -s -u – endeavorous-theming’
[2023-06-04T18:23:05+0200] [PACMAN] Running ‘pacman --remove -c -s -u – endeavouros-mirrorlist-23.4-1-any’
[2023-06-04T18:23:23+0200] [PACMAN] Running ‘pacman --remove -c -s -u – endeavouros-mirrorlist’
[2023-06-04T18:23:24+0200] [ALPM] transaction started
[2023-06-04T18:23:24+0200] [ALPM] warning: /etc/pacman.d/endeavouros-mirrorlist saved as /etc/pacman.d/endeavouros-mirrorlist.pacsave
[2023-06-04T18:23:24+0200] [ALPM] removed endeavouros-mirrorlist (23.3-1)
[2023-06-04T18:23:25+0200] [ALPM] transaction completed
[2023-06-04T18:26:47+0200] [PACMAN] Running ‘pacman --remove -c -s -u – pacman-mirrorlist’
[2023-06-04T18:26:51+0200] [ALPM] running ‘texinfo-remove.hook’…
[2023-06-04T18:26:51+0200] [ALPM] transaction started
[2023-06-04T18:26:51+0200] [ALPM] removed reflector-simple (2023-2)
[2023-06-04T18:26:51+0200] [ALPM] removed eos-rankmirrors (2.11-1)
[2023-06-04T18:26:51+0200] [ALPM] removed eos-log-tool (23-1)
[2023-06-04T18:26:51+0200] [ALPM] removed net-tools (2.10-2)
[2023-06-04T18:26:51+0200] [ALPM] removed eos-apps-info (1.6-1)
[2023-06-04T18:26:51+0200] [ALPM] removed rebuild-detector (4.4.2-1)
[2023-06-04T18:26:51+0200] [ALPM] removed parallel (20230422-1)
[2023-06-04T18:26:52+0200] [ALPM] removed gimp-devel (2.99.14-2)
[2023-06-04T18:26:52+0200] [ALPM] removed mypaint-brushes1 (1.3.1-1)
[2023-06-04T18:26:52+0200] [ALPM] removed libmypaint (1.6.1-1)
[2023-06-04T18:26:52+0200] [ALPM] removed libwmf (0.2.13-1)
[2023-06-04T18:26:52+0200] [ALPM] removed gegl (0.4.44-1)
[2023-06-04T18:26:52+0200] [ALPM] removed suitesparse (7.0.1-2)
[2023-06-04T18:26:52+0200] [ALPM] removed libspiro (1:20221101-1)
[2023-06-04T18:26:52+0200] [ALPM] removed lensfun (1:0.3.3-2)
[2023-06-04T18:26:52+0200] [ALPM] removed libgexiv2 (0.14.0-4)
[2023-06-04T18:26:52+0200] [ALPM] removed exiv2 (0.27.6-1)
[2023-06-04T18:26:52+0200] [ALPM] removed babl (0.1.106-1)
[2023-06-04T18:26:52+0200] [ALPM] removed eos-update-notifier (23-5)
[2023-06-04T18:26:52+0200] [ALPM] removed eos-bash-shared (23-19)
[2023-06-04T18:26:52+0200] [ALPM] removed yad (12.3-1.1)
[2023-06-04T18:26:52+0200] [ALPM] removed gtksourceview3 (1:3.24.11+r28+g73e57b57-1)
[2023-06-04T18:26:52+0200] [ALPM] removed eos-translations (23-22)
[2023-06-04T18:26:52+0200] [ALPM] removed downgrade (11.3.0-1)
[2023-06-04T18:26:52+0200] [ALPM] removed pkgfile (21-2)
[2023-06-04T18:26:52+0200] [ALPM] removed paru (1.11.2-1)
[2023-06-04T18:26:52+0200] [ALPM] removed pacutils (0.11.1-1)
[2023-06-04T18:26:52+0200] [ALPM] removed pacman-contrib (1.9.0-1)
[2023-06-04T18:26:52+0200] [ALPM] removed expac (10-5)
[2023-06-04T18:26:52+0200] [ALPM] removed base-devel (1-1)
[2023-06-04T18:26:52+0200] [ALPM] removed flex (2.6.4-5)
[2023-06-04T18:26:52+0200] [ALPM] removed fakeroot (1.31-2)
[2023-06-04T18:26:52+0200] [ALPM] removed debugedit (5.0-5)
[2023-06-04T18:26:52+0200] [ALPM] removed bison (3.8.2-5)
[2023-06-04T18:26:52+0200] [ALPM] removed automake (1.16.5-2)
[2023-06-04T18:26:52+0200] [ALPM] removed autoconf (2.71-4)
[2023-06-04T18:26:52+0200] [ALPM] removed m4 (1.4.19-3)
[2023-06-04T18:26:52+0200] [ALPM] removed base (3-1)
[2023-06-04T18:26:52+0200] [ALPM] removed licenses (20220125-2)
[2023-06-04T18:26:52+0200] [ALPM] removed archlinux-keyring (20230504-1)
[2023-06-04T18:26:52+0200] [ALPM] removed appstream-glib (0.8.2-2)
[2023-06-04T18:26:52+0200] [ALPM] warning: /etc/pacman.conf saved as /etc/pacman.conf.pacsave
[2023-06-04T18:26:52+0200] [ALPM] removed pacman (6.0.2-7)
[2023-06-04T18:26:52+0200] [ALPM] warning: /etc/pacman.d/mirrorlist saved as /etc/pacman.d/mirrorlist.pacsave
[2023-06-04T18:26:52+0200] [ALPM] removed pacman-mirrorlist (20230410-1)
[2023-06-04T18:26:52+0200] [ALPM] transaction completed

What do I get first ? What’s broken that would make pacman-static work if fixed?

Try this:

sudo mv /etc/pacman.d/mirrorlist.pacnew /etc/pacman.d/mirrorlist

Then download archlinux-keyring and install it with pacman-static -U then try using pacman-static to install pacman

If it doesn’t work, share the full output here.

Use LANG=C before your commands so the output is in english.

This is your problem right here.

Never use pacman -Rcsu

@dalto it seems it’s more than removing packages, I think.

Maybe a better approach is chroot from USB installer and run pacman --root, or similar. :person_shrugging:

That is just a warning from having an older pacman.conf I think. I don’t think it is material to the problem in this case.

Yes, so OP has to explain more about what he did, or anything about other systems, replace system mounts (/usr, /etc) etc.

How?

wget https://arch.mirror.constant.com/core/os/x86_64/archlinux-keyring-20230504-1-any.pkg.tar.zst
sudo pacman -U ./archlinux-keyring-20230504-1-any.pkg.tar.zst

They ran sudo pacman -Rscu pacman-mirrorlist

1 Like

Nope:

warning: config file /etc/pacman.conf, line 12: directive ‘UseDelta’ in section ‘options’ not recognized.
loading packages…
resolving dependencies…
looking for conflicting packages…
Packages (3) pacman-6.0.2-7 pacman-mirrorlist-20230410-1
archlinux-keyring-20230504-1
Total Installed Size: 6.38 MiB
:: Proceed with installation? [Y/n] Y
error: no servers configured for repository: core
(3/3) checking keys in keyring [##########] 100%
warning: Public keyring not found; have you run ‘pacman-key --init’?
downloading required keys…
error: keyring is not writable
error: keyring is not writable
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.

Can you run this command again and share the output:

sudo pacman-static -U ./archlinux-keyring-20230504-1-any.pkg.tar.zst

You mean sudo ./pacman-static -U ./archlinux-keyring-20230504-1-any.pkg.tar.zst, right ?

Yes.

exactly what I sent.

sudo ./pacman-static -U ./archlinux-keyring-20230504-1-any.pkg.tar.zst
warning: config file /etc/pacman.conf, line 12: directive ‘UseDelta’ in section ‘options’ not recognized.
loading packages…
resolving dependencies…
looking for conflicting packages…
Packages (3) pacman-6.0.2-7 pacman-mirrorlist-20230410-1
archlinux-keyring-20230504-1
Total Installed Size: 6.38 MiB
:: Proceed with installation? [Y/n] Y
error: no servers configured for repository: core
(3/3) checking keys in keyring [##########] 100%
warning: Public keyring not found; have you run ‘pacman-key --init’?
downloading required keys…
error: keyring is not writable
error: keyring is not writable
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.