You are not logged in.

#1 2015-10-11 01:00:04

adityam
Member
Registered: 2008-11-18
Posts: 13

Messed up update over SSH; No libcursesw.so; How to recover

Hi,

I was updating my system remotely via ssh using

$sudo pacman -Syu

All the packages were downloaded correctly but the ssh connection timed out when only a fraction of packages had been installed (let's not get into the details of why the connection time out; most likely because my laptop hibernated).

Now when I try to ssh, I get

zsh: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory
Connection to <hostname> closed.

It appears that libcursesw was updated but zsh (my default shell) was not. So, what can I do now.

I won't have physical access to the server until three days. I was locally logged on to the server, so if the current desktop environment is still running, it may be possible for me to recover by running pacman -u.

However, in the meantime, is there anything that I can try remotely?

Thanks,
Adi

Offline

#2 2015-10-11 01:19:53

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Messed up update over SSH; No libcursesw.so; How to recover

ssh and run pacman rather than a shell:

ssh user@host /usr/bin/pacman -Syu

Although, depending on what actually happened pacman may not work either.

In the future you may want to consider using screen or tmux within ssh sessions so a random disconnect will not interrupt important operations.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2015-10-11 03:06:46

adityam
Member
Registered: 2008-11-18
Posts: 13

Re: Messed up update over SSH; No libcursesw.so; How to recover

Trilby wrote:

ssh and run pacman rather than a shell:

ssh user@host /usr/bin/pacman -Syu

Although, depending on what actually happened pacman may not work either.

It doesn't work. I get the same error message:

zsh: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory

Offline

#4 2018-08-25 11:27:18

bebopson
Member
Registered: 2012-06-21
Posts: 3

Re: Messed up update over SSH; No libcursesw.so; How to recover

I had also had the connection drop, but was able to log back in.  At the time the connection dropped, pacman was waiting for me to confirm new key installation. I tried to run pacman again but it warned me:

error: could not lock database: File exists
  if you're sure a package manager is not already
  running, you can remove /var/lib/pacman/db.lck

I ran ps aux | grep pacman which revealed the pre-connection-drop pacman process is still running. 

root      1290  0.0  0.0  84096  5628 pts/0    S+   06:12   0:00 sudo pacman -Syu
root      1291  0.7  0.6 227520 47172 pts/0    S+   06:12   0:27 pacman -Syu
root      2272  0.0  0.2 147144 22232 ?        Ss   06:35   0:00 dirmngr --daemon --homedir /etc/pacman.d/gnupg

What's the appropriate thing to do in this situation?

Offline

#5 2018-08-25 13:58:26

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,532
Website

Re: Messed up update over SSH; No libcursesw.so; How to recover

bebopson wrote:

What's the appropriate thing to do in this situation?

Create a new topic for your issue, and don't necrobump.

https://wiki.archlinux.org/index.php/Co … bumping.22

Closing.


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

Board footer

Powered by FluxBB