You are not logged in.

#1 2020-09-15 21:22:21

isochor89
Member
Registered: 2020-09-15
Posts: 11

[Solved] Can't install anything anymore not via pacman nor via makepkg

Hello,

i am new to arch linux and everything worked fine for a couple of days.

Background
Last weekend I decided to expand the swap partition (by shrinking the root partition) with cfdisk in order to use the hibernate function.

Unfortunately  after resizing the partitions I forgot to run the command:

resize2fs /dev/nvme0n1p2

So after reboot I found myself in the Grub minimal bash instead of booting into my system as expected.

I tried to rescue the system with

grub> set root=(hd0, msdos2)
grub> set prefix=(hd0, msdos2)/boot/grub
grub> linux /boot/vmlinuz-linux root=/dev/nvme0n1p2
grub> initrd  /boot/initramfs-linux.img
normal

but Grub told me, that the system couln't be started because of segmentation fault. So I plugged in a usb stick with linux mint live to undo my changes I did with cfdisk by using the tool gparted. As a result I was able to boot again. After that I thought my system would be great again so I tried to install gparted on my Arch system to continue my mission to expand the swap drive.

But here I realised, that I can't install anything no more. I even can't run Spotify any longer because the system thinks it is not installed.

Problem
I can't install packages  e.g. gparted with the command

 sudo pacman -S gparted

I can't install AUR-packages e.g. Spotify by running the following command when I am in the respective folder where the PKGBUILD is located:

 makepkg -si 

It doesn't matter which Programm I want to install and from where I wan't to install it (official repo/AUR)

I can't insert here the output because I get 43000 lines of Errors. The output looks like this though for every program:



resolving dependencies...
looking for conflicting packages...
..list of all packages...
Total Installed Size:  985.94 MiB

checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
linux-api-headers: /usr/include/asm-generic/auxvec.h exists in filesystem
linux-api-headers: /usr/include/asm-generic/bitsperlong.h exists in filesystem
linux-api-headers: /usr/include/asm-generic/bpf_perf_event.h exists in filesystem
linux-api-headers: /usr/include/asm-generic/errno-base.h exists in filesystem
glibc: /usr/include/sys/mtio.h exists in filesystem
glibc: /usr/include/sys/param.h exists in filesystem
glibc: /usr/include/sys/pci.h exists in filesystem
pcre: /usr/lib/libpcrecpp.so exists in filesystem
pcre: /usr/lib/libpcrecpp.so.0 exists in filesystem
pcre: /usr/lib/libpcrecpp.so.0.0.2 exists in filesystem
pcre: /usr/lib/libpcreposix.so exists in filesystem
pcre: /usr/lib/libpcreposix.so.0 exists in filesystem
pcre: /usr/lib/libpcreposix.so.0.0.7 exists in filesystem
pcre: /usr/lib/pkgconfig/libpcre.pc exists in filesystem
pcre: /usr/lib/pkgconfig/libpcre16.pc exists in filesystem
pcre: /usr/lib/pkgconfig/libpcre32.pc exists in filesystem
pcre: /usr/lib/pkgconfig/libpcrecpp.pc exists in filesystem
pcre: /usr/lib/pkgconfig/libpcreposix.pc exists in filesystem
pcre: /usr/share/doc/pcre/AUTHORS exists in filesystem
pcre: /usr/share/doc/pcre/COPYING exists in filesystem

and so on and so forth. the Last line is

Errors occurred, no packages were upgraded.

Approach
I am also  not able to list any installed package by using e.g.

 pacman -Qm  or 
pacman -Qe

The output is empty.

I also can't update the system via

 sudo pacman -Syu

getting following output:

:: Synchronizing package databases...
 core                                                                                                             131.6 KiB   454 KiB/s 00:00 [#######################################################################################] 100%
 extra                                                                                                           1660.9 KiB   856 KiB/s 00:02 [#######################################################################################] 100%
 community                                                                                                          5.2 MiB   611 KiB/s 00:09 [#######################################################################################] 100%
 multilib is up to date
:: Starting full system upgrade...
 there is nothing to do

I did a lot (or some?)  research regarding this problem, but I don't find similarities with the problems of other people even though the error

Errors occurred, no packages were upgraded.

is quite common. But when other people are getting this error it is for a couple of packages. I am getting 40k lines of errors so I assume it is a structural problem which could be linked to the resizing of the swap partition /shrinking the root partition.

Thank you very much!


Operating System: Arch Linux
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.1
Kernel Version: 5.4.64-1-lts
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-6500 CPU @ 3.20GHz
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 5700 XT
sudo fdisk -l
Disk /dev/nvme0n1: 953.87 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: ADATA SX8200PNP                         
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa2e68fb9

Device         Boot      Start        End    Sectors   Size Id Type
/dev/nvme0n1p1            2048   84088831   84086784  40.1G 82 Linux swap / Solaris
/dev/nvme0n1p2 *      84088832  510658559  426569728 203.4G 83 Linux
/dev/nvme0n1p3       510658560 1540761599 1030103040 491.2G 83 Linux
/dev/nvme0n1p4      1540761600 2000408575  459646976 219.2G 83 Linux

Last edited by isochor89 (2020-09-24 21:11:59)

Offline

#2 2020-09-15 21:41:42

loqs
Member
Registered: 2014-03-06
Posts: 17,195

Re: [Solved] Can't install anything anymore not via pacman nor via makepkg

Please post the output of the following: (# means execute as root)

# pacman -Qkk | grep -vF '0 altered files' 2>&1
# pacman -Syu
cat /var/log/pacman.log

See the tip box from pastebin to pipe the output to a pastebin.
Please use code tags for commands and their outputs not quote tags.

Last edited by loqs (2020-09-15 21:43:49)

Offline

#3 2020-09-15 21:42:20

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: [Solved] Can't install anything anymore not via pacman nor via makepkg

Please use "code" tags, not "quote" tags for shell IO an text files. You can also use a pastebin service to upload bigger texts (see link in my signature)

It looks like your local pacman database is gone or you accidentally configured it to a different place.
What's the output of

ls -l /var/lib/pacman/local/glibc*

Offline

#4 2020-09-15 21:51:17

isochor89
Member
Registered: 2020-09-15
Posts: 11

Re: [Solved] Can't install anything anymore not via pacman nor via makepkg

The following command doesn't return anything

[xx@stationaryPC ~]$ pacman -Qkk | grep -vF '0 altered files' 2>&1
[xx@stationaryPC ~]$ sudo pacman -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Starting full system upgrade...
 there is nothing to do

The result of

[xx@stationaryPC ~]$ cat /var/log/pacman.log

is

[2020-09-13T19:31:23+0200] [PACMAN] Running 'pacman -Syu'
[2020-09-13T19:31:23+0200] [PACMAN] synchronizing package lists
[2020-09-13T19:31:49+0200] [PACMAN] starting full system upgrade
[2020-09-13T19:32:19+0200] [PACMAN] Running 'pacman -S gparted'
[2020-09-13T19:36:34+0200] [PACMAN] Running 'pacman -S gparted'
[2020-09-13T19:36:53+0200] [PACMAN] Running 'pacman -Syu'
[2020-09-13T19:36:53+0200] [PACMAN] synchronizing package lists
[2020-09-13T19:37:21+0200] [PACMAN] starting full system upgrade
[2020-09-13T19:37:36+0200] [PACMAN] Running 'pacman -S gparted'
[2020-09-13T21:36:44+0200] [PACMAN] Running 'pacman -S gparted'
[2020-09-13T21:46:26+0200] [PACMAN] Running 'pacman -S gparted'
[2020-09-13T22:09:31+0200] [PACMAN] Running 'pacman -S gparted'
[2020-09-14T23:24:41+0200] [PACMAN] Running 'pacman -Syu'
[2020-09-14T23:24:41+0200] [PACMAN] synchronizing package lists
[2020-09-14T23:24:57+0200] [PACMAN] starting full system upgrade
[2020-09-14T23:29:42+0200] [PACMAN] Running 'pacman -S Spotify'
[2020-09-14T23:29:46+0200] [PACMAN] Running 'pacman -S spotify'
[2020-09-14T23:29:59+0200] [PACMAN] Running 'pacman -U spotify'
[2020-09-14T23:43:51+0200] [PACMAN] Running '/usr/bin/pacman -S --asdeps alsa-lib>=1.0.14 gtk2 libsystemd libxss desktop-file-utils openssl nss at-spi2-atk libcurl-gnutls'
[2020-09-15T21:01:28+0200] [PACMAN] Running 'pacman -Syu'
[2020-09-15T21:01:28+0200] [PACMAN] synchronizing package lists
[2020-09-15T21:01:37+0200] [PACMAN] starting full system upgrade
[2020-09-15T21:04:43+0200] [PACMAN] Running '/usr/bin/pacman -S --asdeps alsa-lib>=1.0.14 gtk2 libsystemd libxss desktop-file-utils openssl nss at-spi2-atk libcurl-gnutls'
[2020-09-15T21:11:04+0200] [PACMAN] Running '/usr/bin/pacman -S --asdeps alsa-lib>=1.0.14 gtk2 libsystemd libxss desktop-file-utils openssl nss at-spi2-atk libcurl-gnutls'
[2020-09-15T21:12:26+0200] [PACMAN] Running '/usr/bin/pacman -S --asdeps alsa-lib>=1.0.14 gtk2 libsystemd libxss desktop-file-utils openssl nss at-spi2-atk libcurl-gnutls'
[2020-09-15T21:15:39+0200] [PACMAN] Running '/usr/bin/pacman -S --asdeps alsa-lib>=1.0.14 gtk2 libsystemd libxss desktop-file-utils openssl nss at-spi2-atk libcurl-gnutls'
[2020-09-15T21:17:35+0200] [PACMAN] Running 'pacman -S alsa-lib'
[2020-09-15T21:17:54+0200] [PACMAN] Running 'pacman -S gparted'
[2020-09-15T21:18:57+0200] [PACMAN] Running 'pacman -Syu --noconfirm --needed --overwrite *'
[2020-09-15T21:18:57+0200] [PACMAN] synchronizing package lists
[2020-09-15T21:18:57+0200] [PACMAN] starting full system upgrade
[2020-09-15T21:28:55+0200] [PACMAN] Running 'pacman -S needed'
[2020-09-15T21:29:06+0200] [PACMAN] Running 'pacman -S --needed'
[2020-09-15T21:29:45+0200] [PACMAN] Running 'pacman -S gparted'
[2020-09-15T21:30:27+0200] [PACMAN] Running 'pacman -S gparted'
[2020-09-15T21:38:30+0200] [PACMAN] Running 'pacman -Fy'
[2020-09-15T21:38:30+0200] [PACMAN] synchronizing package lists
[2020-09-15T21:39:15+0200] [PACMAN] Running 'pacman -Syu'
[2020-09-15T21:39:15+0200] [PACMAN] synchronizing package lists
[2020-09-15T21:39:15+0200] [PACMAN] starting full system upgrade
[2020-09-15T21:39:34+0200] [PACMAN] Running '/usr/bin/pacman -S --asdeps alsa-lib>=1.0.14 gtk2 libsystemd libxss desktop-file-utils openssl nss at-spi2-atk libcurl-gnutls'
[2020-09-15T22:01:05+0200] [PACMAN] Running 'pacman -Syu base'
[2020-09-15T22:01:05+0200] [PACMAN] synchronizing package lists
[2020-09-15T22:01:05+0200] [PACMAN] starting full system upgrade
[2020-09-15T22:31:02+0200] [PACMAN] Running 'pacman -S gparted'
[2020-09-15T22:31:18+0200] [PACMAN] Running 'pacman -S gparted'
[2020-09-15T22:55:42+0200] [PACMAN] Running 'pacman -S gparted'
[2020-09-15T23:07:25+0200] [PACMAN] Running 'pacman -Syu'
[2020-09-15T23:07:25+0200] [PACMAN] synchronizing package lists
[2020-09-15T23:07:37+0200] [PACMAN] starting full system upgrade
[2020-09-15T23:47:29+0200] [PACMAN] Running 'pacman -Syu'
[2020-09-15T23:47:29+0200] [PACMAN] synchronizing package lists
[2020-09-15T23:47:31+0200] [PACMAN] starting full system upgrade

Offline

#5 2020-09-15 21:52:50

isochor89
Member
Registered: 2020-09-15
Posts: 11

Re: [Solved] Can't install anything anymore not via pacman nor via makepkg

the output of

[xx@stationaryPC ~]$ sudo ls -l /var/lib/pacman/local/glibc*
is 
ls: cannot access '/var/lib/pacman/local/glibc*': No such file or directory

Offline

#6 2020-09-15 21:58:58

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: [Solved] Can't install anything anymore not via pacman nor via makepkg

Don't try to sudo-fix stuff.

Output of

ls -l /var/lib/pacman/local

But your pacman log starts w/ the effort to install gparted…

Did you use an extra partition for /var?
What are the outputs of

mount
lsblk -f

Offline

#7 2020-09-15 22:24:42

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Solved] Can't install anything anymore not via pacman nor via makepkg

That isn't your complete pacman.log. Please post it in its entirety.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#8 2020-09-16 00:45:36

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Solved] Can't install anything anymore not via pacman nor via makepkg

Just based on the first post alone:

isochor89 wrote:

I can't insert here the output because I get 43000 lines of Errors. The output looks like this though for every program:

resolving dependencies...
looking for conflicting packages...
..list of all packages...
Total Installed Size:  985.94 MiB

checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
linux-api-headers: /usr/include/asm-generic/auxvec.h exists in filesystem
linux-api-headers: /usr/include/asm-generic/bitsperlong.h exists in filesystem
linux-api-headers: /usr/include/asm-generic/bpf_perf_event.h exists in filesystem
linux-api-headers: /usr/include/asm-generic/errno-base.h exists in filesystem
glibc: /usr/include/sys/mtio.h exists in filesystem
glibc: /usr/include/sys/param.h exists in filesystem
glibc: /usr/include/sys/pci.h exists in filesystem
pcre: /usr/lib/libpcrecpp.so exists in filesystem
pcre: /usr/lib/libpcrecpp.so.0 exists in filesystem
pcre: /usr/lib/libpcrecpp.so.0.0.2 exists in filesystem
pcre: /usr/lib/libpcreposix.so exists in filesystem
pcre: /usr/lib/libpcreposix.so.0 exists in filesystem
pcre: /usr/lib/libpcreposix.so.0.0.7 exists in filesystem
pcre: /usr/lib/pkgconfig/libpcre.pc exists in filesystem
pcre: /usr/lib/pkgconfig/libpcre16.pc exists in filesystem
pcre: /usr/lib/pkgconfig/libpcre32.pc exists in filesystem
pcre: /usr/lib/pkgconfig/libpcrecpp.pc exists in filesystem
pcre: /usr/lib/pkgconfig/libpcreposix.pc exists in filesystem
pcre: /usr/share/doc/pcre/AUTHORS exists in filesystem
pcre: /usr/share/doc/pcre/COPYING exists in filesystem

40k errors for the entire package list conflicting on every singe file indicates pacman doesn't seem to think the packages have installed *any* files. Only install size is shown, not "Net Upgrade Size:", so pacman thinks every single package you're installing right now is a first-time install, not an upgrade or reinstall.

Your pacman database is completely borked

isochor89 wrote:

I am also  not able to list any installed package by using e.g.

 pacman -Qm  or 
pacman -Qe

The output is empty.

This kind of confirms it. The combination of pacman -Qm and pacman -Qe equals all packages which were explicitly installed or installed from alternative sources like the AUR; really, a better test is just -Q for all packages (-Qe plus -Qd) which is the same as seth's "ls -l /var/lib/pacman/local" test.

It's exceedingly unlikely that you have NO explicitly installed packages, but you've since confirmed you have no packages installed period.


tl;dr

You are really hosed without the pacman database. idk if your adventures in cfdisk caused the sectors containing it to be deleted, or what -- but who nows what else is gone?

Your best bet is to back up your /home and other important user data, then nuke the root partition and reinstall from scratch.

You could also try recreating the database by filtering every file on the system to check which packages "should" be installed, then reinstalling them with pacman --overwrite "*" and repeating until you have no more untracked files. But that's going to be much more work and it's not really worth it IMO. Generally, it is preferred to fix your install rather than re-installing, but this only really applies if you have a pacman database.

(One potential way to relatively painlessly recreate the db is to parse pacman.log but apparently that file is missing most info and starts 2 days ago with installing gparted, so OOPS.)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#9 2020-09-24 21:10:51

isochor89
Member
Registered: 2020-09-15
Posts: 11

Re: [Solved] Can't install anything anymore not via pacman nor via makepkg

Thank you all for your help!
As suggested I reinstalled Arch-Linux. Hopefully this problem won't occur again since nothing was learned from this error except that I am now more fluent in installing arch neutral

Offline

#10 2020-09-24 21:22:13

euromatlox
Member
Registered: 2017-02-10
Posts: 110

Re: [Solved] Can't install anything anymore not via pacman nor via makepkg

I recently had gparted / Libparted Error, 'unable to inform the kernel of the change..'. When used outside OS, using gparted USB stick, no errors. I have now decided not to install gparted into Linux OS, if I need it,  I will use it from USB stick outside OS.

Offline

#11 2020-09-24 21:23:35

loqs
Member
Registered: 2014-03-06
Posts: 17,195

Re: [Solved] Can't install anything anymore not via pacman nor via makepkg

euromatlox wrote:

I recently had gparted / Libparted Error, 'unable to inform the kernel of the change..'. When used outside OS, using gparted USB stick, no errors. I have now decided not to install gparted into Linux OS, if I need it,  I will use it from USB stick outside OS.

See https://bbs.archlinux.org/viewtopic.php?id=258991

Offline

Board footer

Powered by FluxBB