You are not logged in.

#1 2020-09-26 09:18:15

aznd
Member
Registered: 2020-06-24
Posts: 47

[SOLVED] Cant sudo pacman -Syu

Hello,
so when i try to run pacman -Syu
i get

:: Synchronising 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...
:: Replace libutil-linux with core/util-linux-libs? [Y/n] 

when i choose yes, i get

:: Replace libutil-linux with core/util-linux-libs? [Y/n] y
resolving dependencies...
looking for conflicting packages...
warning: could not fully load metadata for package python-pygments-2.6.1-3
error: failed to prepare transaction (invalid or corrupted package)

and when i choose no i get

:: Replace libutil-linux with core/util-linux-libs? [Y/n] n
resolving dependencies...
looking for conflicting packages...
:: util-linux-libs and libutil-linux are in conflict. Remove libutil-linux? [y/N] 

and when i choose yes there i get the could not fully load metadata error.
So what can i do that i can upgrade (-Syu) my system?
Thanks for the help

Last edited by aznd (2020-09-26 12:07:14)

Offline

#2 2020-09-26 09:41:24

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,671

Re: [SOLVED] Cant sudo pacman -Syu

I don't believe the renaming of libutil-linux is related to the problem with python-pygments. Fix (reinstall) python-pygments first then upgrade.

Offline

#3 2020-09-26 09:43:10

Wild Penguin
Member
Registered: 2015-03-19
Posts: 388

Re: [SOLVED] Cant sudo pacman -Syu

Did you try again (after some time, say 10minutes - 3 hours)?

Sometimes it can happen that a mirror is not in sync / in the middle of a sync when you do your upgrade, and IIRC then you can see errors like this (EDIT: about metadata. Skunktrader is right in that the problem has nothing to do with renaming of libutil-linux). After it has properly synced, and you try to upgrade again, the upgrade should pass.

If that doesn't work, you could try to change your mirror.

If that *still* doesn't work, I suppose you could try pacman -Syyu. That is rarely needed to resolve any problems and should be run rarely (with two "y"'s). Someone will correct me if this is unnecessary / bad idea!

Last edited by Wild Penguin (2020-09-26 09:45:53)

Offline

#4 2020-09-26 09:44:21

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

Re: [SOLVED] Cant sudo pacman -Syu

You can try another mirror. Remember to enable at least one, I guess the preferred one should be put first.

Last edited by euromatlox (2020-09-26 09:46:36)

Offline

#5 2020-09-26 09:54:25

aznd
Member
Registered: 2020-06-24
Posts: 47

Re: [SOLVED] Cant sudo pacman -Syu

skunktrader, reinstall you mean remove and install the package?

sudo pacman -R python-pygments
warning: could not fully load metadata for package python-pygments-2.6.1-3
checking dependencies...

Packages (1) python-pygments-2.6.1-3


:: Do you want to remove these packages? [Y/n] y
:: Processing package changes...
(1/1) removing python-pygments                                                                         [############################################################] 100%
error: could not remove database entry python-pygments-2.6.1-3

So that doesnt work
also sudo pacman -U cant find or read the package, even if pacman -R found it.
Wild Penguin, yes i tried again. Yesterday it also didnt worked.
pacman -Syyu is the same error as the first.
im going to try another mirror

Offline

#6 2020-09-26 09:57:40

aznd
Member
Registered: 2020-06-24
Posts: 47

Re: [SOLVED] Cant sudo pacman -Syu

Trying different mirrors dont seem to help. Any other solutions i can try?

Offline

#7 2020-09-26 10:47:10

loqs
Member
Registered: 2014-03-06
Posts: 18,859

Re: [SOLVED] Cant sudo pacman -Syu

What is the output of

# pacman -Qkk | grep -vF '0 altered files'

Offline

#8 2020-09-26 10:48:30

hcjl
Member
From: berlin
Registered: 2007-06-29
Posts: 330

Re: [SOLVED] Cant sudo pacman -Syu

Offline

#9 2020-09-26 10:58:57

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

Re: [SOLVED] Cant sudo pacman -Syu

Check if that python package is in package cache, and remove it. I'm not sure if reinstalling downloads the package again, if it's in cache. I think it does, but just to be absolute sure.

ls /var/cache/pacman/pkg/python*

Last edited by euromatlox (2020-09-26 11:01:00)

Offline

#10 2020-09-26 11:01:52

loqs
Member
Registered: 2014-03-06
Posts: 18,859

Re: [SOLVED] Cant sudo pacman -Syu

See post #5 with the failure to remove a package.  There is at least some local database corruption.

Offline

#11 2020-09-26 11:12:15

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

Re: [SOLVED] Cant sudo pacman -Syu

To remove a package, I would do

pacman -Rs package_name

or this more risky one

pacman -Rsc package_name

All explained in Pacman Wiki page.

After that can check also package cache, and possibly remove some packages manually from there too (usually not needed).

Last edited by euromatlox (2020-09-26 11:14:05)

Offline

#12 2020-09-26 11:15:27

loqs
Member
Registered: 2014-03-06
Posts: 18,859

Re: [SOLVED] Cant sudo pacman -Syu

Why would you suggest that before determining the extent of the pacman database corruption?

Offline

#13 2020-09-26 11:21:38

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

Re: [SOLVED] Cant sudo pacman -Syu

Is it really corruption?. Solution for pacman problems usually has been deleting a file or some files or symbolic link. Or downgrading for a while, till next update. Lots of reading this forum and web surfing usually needs to be done, but sometimes a guess has been solution. Of course good to write down (and possibly backup) all own experiments, and not expirement too much.

If update, pacman -Syu fails, usually pacman -Syy still works.

Last edited by euromatlox (2020-09-26 11:28:50)

Offline

#14 2020-09-26 11:28:31

aznd
Member
Registered: 2020-06-24
Posts: 47

Re: [SOLVED] Cant sudo pacman -Syu

http://ix.io/2yMR output of pacman -Qkk | grep -vF '0 altered files'
i did find /var/cache/pacman/pkg/ -iname "*.part" -delete and it returns nothing, but i dont know if its supposed to return anything.
pacman -Rs and -Rsc python-pygments both say could not remove database entry.
euromatlox, ive deleted every file there that begins with python. (in the /var/cache/pacman/pkg folder)
hcjl ive already generated the list for germany, then uncomment (removing the hashtag) some of them  and put it in /etc/pacman.d/mirrorlist.
i think ive now done everything what you guys said.

Last edited by aznd (2020-09-26 11:29:03)

Offline

#15 2020-09-26 11:29:29

aznd
Member
Registered: 2020-06-24
Posts: 47

Re: [SOLVED] Cant sudo pacman -Syu

So i guess i have to fix this could not remove database entry error

Offline

#16 2020-09-26 11:31:20

aznd
Member
Registered: 2020-06-24
Posts: 47

Re: [SOLVED] Cant sudo pacman -Syu

euromatlox pacman -Syu fails, like ive wrote it in the first post. pacman -Syy does work without problems, but that doesnt fixes my problem not being able to -Syu or -Su

Offline

#17 2020-09-26 11:38:06

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

Re: [SOLVED] Cant sudo pacman -Syu

Any help, for x86_64 ?

wget https://ftp5.gwdg.de/pub/linux/archlinux/community/os/x86_64/python-pygments-2.7.1-1-any.pkg.tar.zst
pacman -U /path/to/the/package

FORGET till this main problem solved (database corruption). I guess this is only updated version.

Last edited by euromatlox (2020-09-26 11:44:21)

Offline

#18 2020-09-26 11:38:07

loqs
Member
Registered: 2014-03-06
Posts: 18,859

Re: [SOLVED] Cant sudo pacman -Syu

One modified file from what appears to be every package.  I would suggest checking the state of the drive S.M.A.R.T. Run a test.
Post the output of the test.  Do you have a backup in case of the worst?  If that shows no issues would then try and locate the altered files.
Please post the contents of /var/log/pacman.log.

Offline

#19 2020-09-26 11:40:25

loqs
Member
Registered: 2014-03-06
Posts: 18,859

Re: [SOLVED] Cant sudo pacman -Syu

euromatlox see post #5 pacman will not allow the python-pygments package to be modified until the database corruption is resolved.
Edit:
Sorry for the extra post.

Last edited by loqs (2020-09-26 11:40:46)

Offline

#20 2020-09-26 11:46:06

aznd
Member
Registered: 2020-06-24
Posts: 47

Re: [SOLVED] Cant sudo pacman -Syu

What am i supposed to do with the package euromatlox? should i try to install it? could you maybe tell how to install it? thanks
No, i dont have a backup.
concent of /var/log/pacman.log: https://pastebin.com/7MvKWs5s
After ive done the smart test (short) from my partition /dev/sda4: SMART overall-health self-assessment test result: PASSED
Should i do it for the entire disk?

Last edited by aznd (2020-09-26 11:49:02)

Offline

#21 2020-09-26 11:50:48

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

Re: [SOLVED] Cant sudo pacman -Syu

There's this wiki page about database restoration. I think it's better be absolutely (or 98%) sure that it's corruption here in question before continuing with it.

About that file before, I personally see no reason not try installing it, but as other user here said, it probably won't work.

Last edited by euromatlox (2020-09-26 11:53:35)

Offline

#22 2020-09-26 11:51:47

aznd
Member
Registered: 2020-06-24
Posts: 47

Re: [SOLVED] Cant sudo pacman -Syu

Okay, then im going to the database restoration? im going to write something about it when im done

Offline

#23 2020-09-26 11:52:23

loqs
Member
Registered: 2014-03-06
Posts: 18,859

Re: [SOLVED] Cant sudo pacman -Syu

The test will have been for the entire device.  Please post the output of

# smartctl -a /dev/sda

You can try installing the package with pacman -U,  I expect pacman will refuse to install it.
Edit:
Please try the following

pacman -S --dbonly python-pygments
pacman -R python-pygments
pacman -Syu

Last edited by loqs (2020-09-26 11:54:22)

Offline

#24 2020-09-26 11:57:01

aznd
Member
Registered: 2020-06-24
Posts: 47

Re: [SOLVED] Cant sudo pacman -Syu

loqs pacman -S --dbonly python-pygments gives

sudo pacman -R python-pygments
warning: could not fully load metadata for package python-pygments-2.6.1-3
checking dependencies...

Packages (1) python-pygments-2.6.1-3


:: Do you want to remove these packages? [Y/n] y
:: Processing package changes...
(1/1) removing python-pygments                                                                         [############################################################] 100%
error: could not remove database entry python-pygments-2.6.1-3 
 sudo smartctl -a /dev/sda
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.8.5-arch1-1] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Samsung based SSDs
Device Model:     Samsung SSD 840 EVO 250GB
Serial Number:    S1DBNSBF303595X
LU WWN Device Id: 5 002538 8a02bd023
Firmware Version: EXT0DB6Q
User Capacity:    250.059.350.016 bytes [250 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4c
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sat Sep 26 13:57:29 2020 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
                                        was never started.
                                        Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever 
                                        been run.
Total time to complete Offline 
data collection:                ( 4800) seconds.
Offline data collection
capabilities:                    (0x53) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        No Offline surface scan supported.
                                        Self-test supported.
                                        No Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine 
recommended polling time:        (   2) minutes.
Extended self-test routine
recommended polling time:        (  80) minutes.
SCT capabilities:              (0x003d) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   098   098   000    Old_age   Always       -       8443
 12 Power_Cycle_Count       0x0032   093   093   000    Old_age   Always       -       6304
177 Wear_Leveling_Count     0x0013   092   092   000    Pre-fail  Always       -       88
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   100   100   010    Pre-fail  Always       -       0
181 Program_Fail_Cnt_Total  0x0032   100   100   010    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   010    Old_age   Always       -       0
183 Runtime_Bad_Block       0x0013   100   100   010    Pre-fail  Always       -       0
187 Uncorrectable_Error_Cnt 0x0032   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0032   073   049   000    Old_age   Always       -       27
195 ECC_Error_Rate          0x001a   200   200   000    Old_age   Always       -       0
199 CRC_Error_Count         0x003e   099   099   000    Old_age   Always       -       2
235 POR_Recovery_Count      0x0012   099   099   000    Old_age   Always       -       2203
241 Total_LBAs_Written      0x0032   099   099   000    Old_age   Always       -       49181619910

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%         2         -
# 2  Short offline       Completed without error       00%         0         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay. 

And the restore local database seems to be too difficult for me, i can do it until im reaching the bash functions part

Last edited by aznd (2020-09-26 12:00:07)

Offline

#25 2020-09-26 12:00:29

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

Re: [SOLVED] Cant sudo pacman -Syu

Just found this older post about similar situation.

Offline

Board footer

Powered by FluxBB