You are not logged in.

#1 2016-11-14 08:39:13

YuTendo
Member
Registered: 2013-11-17
Posts: 1

[SOLVED] Bash and Readline Update

Hi everyone,

today my system was broken after "pacman -Syu". Just wondering if I'm the only one -so did I something wrong? The last "pacman -Syu" was two days ago. During "pacman -Syu" my bash started throwing the error that "libreadline.so.6" is not available. As far as I saw, it was upgraded to version 7...so version 6 was removed. However, it seems that bash needed version 6. There was also an upgrade for bash -which seems to need version "7". However, the library was updated before bash, so that the system was unable to update bash. As a result, bash was unusable, the system did not boot anymore, and (of course) arch-chroot did also not work. As a workaround I had to copy the requires libaries (e.g., libreadline.so.6) by hand -after that I was able to complete "pacman -Syu" so updated bash to the current version (4.4-1).

Why did that happen? bad luck?

Thank you

Best regards,
Yu

Edit:
Solution (thx@arojas)
Rebuild your initramfs manually and it should be fine. So just run "mkinitcpio -p linux" after "pacman -Syu".

Last edited by YuTendo (2016-11-16 15:45:45)

Offline

#2 2016-11-14 10:33:45

themouette
Member
Registered: 2016-11-14
Posts: 2

Re: [SOLVED] Bash and Readline Update

Hi,

I do not use bash as main shell, but I use LVM, and during this morning upgrade, I spotted the following error:

( 73/101) upgrading linux                                                                                          [####################################################################] 100%
>>> Updating module dependencies. Please wait ...
>>> Generating initial ramdisk, using mkinitcpio. Please wait...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 4.8.7-1-ARCH
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [encrypt]
  -> Running build hook: [lvm2]
==> ERROR: binary dependency `libreadline.so.6' not found for `/usr/bin/lvm'
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 4.8.7-1-ARCH
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [encrypt]
  -> Running build hook: [lvm2]
==> ERROR: binary dependency `libreadline.so.6' not found for `/usr/bin/lvm'
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful

I now am afraid of restarting my computer...

> As a workaround I had to copy the requires libaries (e.g., libreadline.so.6) by hand -after that I was able to complete "pacman -Syu" so updated bash to the current version (4.4-1).

Where did you find the file?

Offline

#3 2016-11-14 10:39:04

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,097

Re: [SOLVED] Bash and Readline Update

themouette wrote:

I now am afraid of restarting my computer...

Rebuild your initramfs manually and it should be fine.

Offline

#4 2016-11-14 12:49:39

aknarts
Member
Registered: 2013-10-07
Posts: 8

Re: [SOLVED] Bash and Readline Update

I had to rollback bash and readline, the system became...well... not well after the two packages. What solved it for me is to manualy install the packages before doing the full system update

So first downgrade https://wiki.archlinux.org/index.php/do … g_packages

And after that:

sudo pacman -Sy bash gnupg readline

After that everything worked like a charm

Last edited by aknarts (2016-11-14 12:52:05)

Offline

#5 2016-11-14 15:40:12

themouette
Member
Registered: 2016-11-14
Posts: 2

Re: [SOLVED] Bash and Readline Update

Thank you arojas and aknarts. I'll try this.

Offline

#6 2016-11-14 16:18:02

logol
Member
Registered: 2016-03-17
Posts: 3

Re: [SOLVED] Bash and Readline Update

same here... I wasn't able to boot after "pacman -Syu && reboot" and had to use a usb-boot stick. I just made a symbolic link from libreadline.so to libreadline.so.6 - but it's just a bad/quick fix (you will get something like: Symbol `rl_readline_state' has different size in shared object, consider re-linking)

I hope reinstalling bash and readline will help smile

edit: yep, "mkinitcpio -p linux" also needed - thanks!

Last edited by logol (2016-11-14 16:26:11)

Offline

#7 2016-11-14 16:21:03

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: [SOLVED] Bash and Readline Update

It won't. As arojas said, rebuild your initramfs.

Er, depending on what issue you're talking about. We seem to have 2 different ones happening in this thread.

Last edited by Scimmia (2016-11-14 16:22:27)

Offline

#8 2016-11-14 16:30:09

logol
Member
Registered: 2016-03-17
Posts: 3

Re: [SOLVED] Bash and Readline Update

I think both belong the libreadline.so.6 issue...

the update this morning also contained a new kernel, but the readline issue broke the initramfs hook and therefore people might not be able to boot if they reboot before fixing the issue (libreadline + rebuilding initramfs)

Offline

#9 2016-11-14 18:36:16

Texbrew
Member
From: The Lone Star State
Registered: 2016-02-09
Posts: 580

Re: [SOLVED] Bash and Readline Update

I upgraded this machine yesterday.

uname -r
4.8.7-1-ARCH
bash --version
GNU bash, version 4.3.46(1)-release (x86_64-unknown-linux-gnu)
whereis libreadline.so.6
libreadline.so: /usr/lib/libreadline.so.6 /usr/lib/libreadline.so

So, libreadline.so.6 is there, and my bash version is not the same as the OP's

-after that I was able to complete "pacman -Syu" so updated bash to the current version (4.4-1).

I don't know why my upgrade (yesterday) later than the OP's (two days ago) has not yet presented the bash problem. Should I be concerned?

tex

Edit: clarify when I upgraded

Last edited by Texbrew (2016-11-14 20:38:44)

Offline

#10 2016-11-14 18:46:18

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,845
Website

Re: [SOLVED] Bash and Readline Update

If you last updated two days ago, then it's not surprising you haven't got the readline update yet -- it was pushed out today. If I'm misreading your post and you updated today and didn't get the update, then try another mirror.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#11 2016-11-14 20:42:19

Texbrew
Member
From: The Lone Star State
Registered: 2016-02-09
Posts: 580

Re: [SOLVED] Bash and Readline Update

@WorMzy, I edited my post for clarity. I wil first try the upgrade in a VM. Don't want to bork my favorite lappy...  tex

Offline

#12 2016-11-14 23:54:23

olivarch
Member
Registered: 2013-01-26
Posts: 47

Re: [SOLVED] Bash and Readline Update

As Themouette i'm using lvm, with the same libreadline error during the update.

I saw myself rebooting and thinking that it was a very bad idea.
It is.
Lvm cannot start properly.  I cannot mount my devices. 
I can only see the recovery shell.

What can i do ?

Offline

#13 2016-11-15 00:08:07

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Bash and Readline Update

Chroot in and regenerate your initramfs.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#14 2016-11-15 00:33:10

daintydiabla
Member
Registered: 2016-11-14
Posts: 1

Re: [SOLVED] Bash and Readline Update

I ran into this issue today as well with my updates. My 'readline' package was updated to 7:

[2016-11-14 15:12] [ALPM] upgraded readline (6.3.008-4 -> 7.0-1)

However, I didn't receive all the packages that use readline from that mirror, so after readline updated and my kernel updated, my system was no longer booting and failing with the following error during the mkinitcpio process:

=> ERROR: binary dependency `libreadline.so.6' not found for `/usr/bin/lvm'

I booted up a live iso and fixed this issue by hopping into a chroot and basically just re-running updates. Once I was able to grab the lvm2 update, my system was able to recover itself after running the mkinitcpio. I ran another 'pacman -Syu' afterwards to ensure everything was updated and sure enough a few more updates had shown up, so it appears for me this was merely an issue with bad update timing/mirror issues.

If it helps at all, I pretty much ran the steps from this forum post to recover: https://bbs.archlinux.org/viewtopic.php … 4#p1059124
I don't think all of those steps are necessary, I believe if you just update all your packages & possibly re-run the mkinitcpio, reboot, you'll be good.

Hopefully this helps a little! smile

<3

Last edited by daintydiabla (2016-11-15 00:33:51)

Offline

#15 2016-11-15 01:15:44

olivarch
Member
Registered: 2013-01-26
Posts: 47

Re: [SOLVED] Bash and Readline Update

Thanks Jasonwyran and daintygediabla !

I plugged a LiveUSB (xubuntu) , have chrooted and successfully regenerated initramfs (mkinitcpio -p linux)

However I did two extra thnigs :
1) I copied the missing libs into my lib directory. Does it make sens ? or mkinitcpio would use the lib coming from the LiveCD ?

2) As I use LUKS on LVM, my boot partition is separated from root, so I had to "mount --rbind" it.

Interesting exercise ... hopefully not to be done too often (first time in years of Archlinux usage)... I'll be extra careful about blindly rebooting after an obviously failed update...

Offline

#16 2016-11-15 09:57:49

Nicocys
Member
Registered: 2010-06-05
Posts: 20

Re: [SOLVED] Bash and Readline Update

I don't think you needed to copy the libs, as chrooting will make you use the one from the chrooted system.

I had the same issue with libreadline.so.6 not being found during the mkinitcpio when updating, but no issue as I didn't reboot immediately and re-run mkinitcpio -default after the update.

@logol: Never ever run "pacman -Syu && reboot", always run them separately if you really want to reboot after the update. That way, you have time to scroll by the output from the update process to see if stuff failed or need to be corrected. This gives you a chance to fix it before killing your system wink

Offline

#17 2016-11-15 10:12:47

kralyk
Member
Registered: 2009-04-27
Posts: 72

Re: [SOLVED] Bash and Readline Update

I ran into the same issue yesterday, I rebooted the system because of some other reason and wasn't able to boot up because of the LVM libreadline dependency. Robbed me of a half of a workday.

! THIS IS BAD !

A notice needs to be put up on the front page warning LVM users to rebuild their initcpio otherwise they won't be able to boot up next time!

Last edited by kralyk (2016-11-15 10:14:54)

Offline

#18 2016-11-15 14:44:56

Oguz286
Member
Registered: 2014-07-10
Posts: 6

Re: [SOLVED] Bash and Readline Update

I agree with kralyk, as I just ran into this issue posted a question. Luckily I solved it by finding this topic, but it would be better if it were on the front page.

Offline

#19 2016-11-15 15:24:29

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Bash and Readline Update

kralyk wrote:

! THIS IS BAD !

A notice needs to be put up on the front page warning LVM users to rebuild their initcpio otherwise they won't be able to boot up next time!

Except, for many of us LVM users, it wasn't an issue at all...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#20 2016-11-15 15:27:23

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [SOLVED] Bash and Readline Update

linux 4.8.7-1
Last Updated:     2016-11-11 09:12 UTC

readline
Last Updated:     2016-11-14 07:50 UTC

Anyone who updated between those 2 dates encountered ZERO problems .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#21 2016-11-15 20:45:23

Asbestbrezel
Member
Registered: 2014-07-27
Posts: 67

Re: [SOLVED] Bash and Readline Update

I've got the same problem.
With chroot I downgraded bash and readline and upgrade them again. After that i rebuild the initramfs with "mkinitcpio -p linux"

But its still not working. What can i do?

edit: i'm using lvm with luks and dmcrypt

Last edited by Asbestbrezel (2016-11-15 20:46:37)

Offline

#22 2016-11-15 21:33:19

Nicocys
Member
Registered: 2010-06-05
Posts: 20

Re: [SOLVED] Bash and Readline Update

Do you have any error message when rebuilding the initramfs?

Offline

#23 2016-11-15 21:37:50

schnorchelkatze
Member
Registered: 2012-03-19
Posts: 4

Re: [SOLVED] Bash and Readline Update

Asbestbrezel wrote:

I've got the same problem.
With chroot I downgraded bash and readline and upgrade them again. After that i rebuild the initramfs with "mkinitcpio -p linux"

But its still not working. What can i do?

edit: i'm using lvm with luks and dmcrypt

Same problem here with similar configuration (lvm,luks,dmcrypt, two partitions: encrypted /, encrypted /home).

I booted from a Fedora 24 Livedisk and did everything mentioned before:
- chrooted into my root-partition
- downgraded bash, readline, kernel, gnupg
- mkinitcpio -p linux
- updated all packages
- …

Nicocys wrote:

Do you have any error message when rebuilding the initramfs?

Nope, i get no error messages while rebuilding the initramfs with "mkinitcpio -p linux".

Nothing works so far.
Every boot i get dropped to the emergency shell, mentioning that "mount can't find UUID=xyz…". The command "lvm" doesn't work from there and gives me an error about "libreadline.so.6" is missing, so i made a symbolic link with that name to the "libreadline.so.7.0" but this didn't help.
I'm currently running out of ideas.

Is there a special order in which i have to downgrade, rebuild my initramfs or so?
Is there something important i am missing when chrooting and rebuilding initramfs?
Could it be an GRUB issue with that UUID?

Last edited by schnorchelkatze (2016-11-15 21:41:01)

Offline

#24 2016-11-15 21:47:50

Nicocys
Member
Registered: 2010-06-05
Posts: 20

Re: [SOLVED] Bash and Readline Update

Did you redo the mkinitcpio -p linux (or even mkinitcpio -p default) after upgrading readline ?
Edit: the error you got suggests that grub fails to find your partitions, which would be the case if lvm fails due to the readline update. I solved that by doing the update normally (with failed mkinitcpio) and rerunnig the mkinitcpio command just after, without playing with symlinks.

Last edited by Nicocys (2016-11-15 21:53:21)

Offline

#25 2016-11-15 21:55:21

Asbestbrezel
Member
Registered: 2014-07-27
Posts: 67

Re: [SOLVED] Bash and Readline Update

Ok, its working now. I simply forgot to mount the boot-partition to /mnt/boot .......

Offline

Board footer

Powered by FluxBB