Score:0

Rescue Tip: Wrong library file installation damaged Ubuntu 18.04 after upgrade

fm flag

There was an old Ubuntu 14.04 linode.com instance which I attempted to upgrade to 18.04. Some Dependencies where somehow not upgraded anyway.

So I attempted to install corresponding deb file from Ubuntu server (as it was not in repo)

The following packages have unmet dependencies:
 dpkg : Breaks: libdpkg-perl (< 1.18.11) but 1.18.4ubuntu1 is to be installed
        Breaks: libdpkg-perl:i386 (< 1.18.11)
 libc-bin : Depends: libc6 (< 2.25) but 2.27-3ubuntu1.2 is to be installed
 locales : Depends: libc-bin (> 2.27)

I accidentally installed wrong version of libc6 which result to damage the instance.

root@myself:~# dpkg -i libc6_2.27-3ubuntu1_amd64.deb 
dpkg: warning: downgrading libc6:amd64 from 2.31-0ubuntu9.2 to 2.27-3ubuntu1
(Reading database ... 110607 files and directories currently installed.)
Preparing to unpack libc6_2.27-3ubuntu1_amd64.deb ...
/usr/bin/perl: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
dpkg: error processing archive libc6_2.27-3ubuntu1_amd64.deb (--install):
 subprocess new pre-installation script returned error exit status 127
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Errors were encountered while processing:
 libc6_2.27-3ubuntu1_amd64.deb

Now I cannot access ssh

Login via Lish Gateway(Linode SH), I get the following message and it doesn't accept any login.

 * Stopping flush early job output to logs                               [ OK ]
 * Starting SystemD login management service                             [ OK ]
 * Starting system logging daemon                                        [ OK ]
 * Starting Bridge socket events into upstart                            [ OK ]
 * Starting Bridge file events into upstart                              [ OK ]
 * Setting up X socket directories...                                    [ OK ]
 * Stopping cold plug devices                                            [ OK ]
 * Stopping log initial device creation                                  [ OK ]
 * Stopping System V initialisation compatibility                        [ OK ]
 * Starting configure network device security                            [ OK ]
 * Starting System V runlevel compatibility                              [ OK ]
 * Starting OpenSSH server                                               [ OK ]
 * Starting regular background program processing daemon                 [ OK ]
 * Starting save kernel messages                                         [ OK ]
 * Stopping save kernel messages                                         [ OK ]
 * Starting configure virtual network devices                            [ OK ]
 * Starting MySQL Server                                                 [fail]
 * Restoring resolver state...                                           [ OK ]
 * Stopping MySQL Server                                                 [ OK ]                                                                         
 *                                                                             
 * The apache2 configtest failed.                                              
Output of config test was:                                                     
/usr/sbin/apache2: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such
Action 'configtest' failed.                                                    
The Apache error log may have more information.                                
 * Stopping System V runlevel compatibility                              [ OK ]
                                                                               
Ubuntu 18.04.1 LTS nmd2 ttyS0                                             
                                                                               
nmd2 login:                                                                   
---------------------------------------------

So attempting a rescue mode is the only option. It seems libcrypt dependency is causing the error.

How to solve this in rescue mode. Any advice please.

Michael Hampton avatar
cz flag
Create a new instance and move your data.
TELA avatar
fm flag
@MichaelHampton, I need to recover mysql databse. Is it possible via any other means please.
Michael Hampton avatar
cz flag
Of course you need to recover the database. So create the new instance and move the data.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.