0

I did executed following command on my live server with sudo

dpkg -i mod-pagespeed-*.deb
apt-get -f install

and It told me and now I am unable to install apache2 please help me..

> Reading package lists... Done Building dependency tree        Reading
> state information... Done Correcting dependencies... Done The
> following packages were automatically installed and are no longer
> required:   libemail-send-io-perl libgd-text-perl libchart-perl
> libmime-types-perl libemail-mime-encodings-perl libalgorithm-c3-perl  
> libgd-graph3d-perl libclass-load-perl libio-all-perl libgd-gd2-perl
> libxml-parser-perl libmime-tools-perl libmath-round-perl  
> libemail-abstract-perl dbconfig-common libclass-c3-perl libfcgi-perl
> libdatetime-timezone-perl libgd-graph-perl cvs  
> libparams-validate-perl libcgi-pm-perl libemail-mime-contenttype-perl
> libmro-compat-perl libdatetime-perl libdatetime-locale-perl  
> libjs-yui libemail-messageid-perl libfilter-perl
> libtemplate-plugin-gd-perl libemail-date-format-perl
> libreturn-value-perl   libspiffy-perl libperl5.12 libemail-mime-perl
> liblist-moreutils-perl libemail-send-perl libconvert-binhex-perl
> libmail-sendmail-perl   perlmagick libappconfig-perl
> libsys-hostname-long-perl libemail-simple-perl libclass-singleton-perl
> libemail-address-perl   libclass-c3-xs-perl libtemplate-perl
> libc6:i386 libgcc1:i386 libstdc++6:i386 gcc-4.6-base:i386 Use 'apt-get
> autoremove' to remove them. The following extra packages will be
> installed:   gcc-4.6-base:i386 krb5-multidev libc-bin:i386
> libc-dev-bin libc6 libc6:i386 libc6-dev libexpat1 libgcc1:i386
> libgnutls26   libgssapi-krb5-2 libgssrpc4 libk5crypto3
> libkadm5clnt-mit8 libkadm5srv-mit8 libkrb5-3 libkrb5-dev
> libkrb5support0 libssl-dev libssl1.0.0   libstdc++6:i386 libtasn1-3
> Suggested packages:   krb5-doc glibc-doc glibc-doc:i386 locales:i386
> gnutls-bin krb5-user The following packages will be REMOVED:   apache2
> apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common
> bugzilla3 libapache2-mod-php5 libapr1 libaprutil1  
> libaprutil1-dbd-sqlite3 libaprutil1-ldap libc-bin libcap2
> mod-pagespeed-stable:i386 The following NEW packages will be
> installed:   gcc-4.6-base:i386 libc-bin:i386 libc6:i386 libgcc1:i386
> libstdc++6:i386 The following packages will be upgraded:  
> krb5-multidev libc-dev-bin libc6 libc6-dev libexpat1 libgnutls26
> libgssapi-krb5-2 libgssrpc4 libk5crypto3 libkadm5clnt-mit8  
> libkadm5srv-mit8 libkrb5-3 libkrb5-dev libkrb5support0 libssl-dev
> libssl1.0.0 libtasn1-3 WARNING: The following essential packages will
> be removed. This should NOT be done unless you know exactly what you
> are doing!   libc-bin 17 upgraded, 5 newly installed, 14 to remove and
> 129 not upgraded. 1 not fully installed or removed. Need to get 16.1
> MB of archives. After this operation, 40.7 MB disk space will be
> freed. You are about to do something potentially harmful. To continue
> type in the phrase 'Yes, do as I say!'  ?] Yes, do as I say! Get:1
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> libc6-dev amd64 2.13-20ubuntu5.3 [2590 kB] Get:2
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> libc-dev-bin amd64 2.13-20ubuntu5.3 [83.4 kB] Get:3
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> libc-bin i386 2.13-20ubuntu5.3 [938 kB] Get:4
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> libc6 amd64 2.13-20ubuntu5.3 [4298 kB] Get:5
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> libssl-dev amd64 1.0.0e-2ubuntu4.7 [1486 kB] Get:6
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> libssl1.0.0 amd64 1.0.0e-2ubuntu4.7 [965 kB] Get:7
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric/main
> gcc-4.6-base i386 4.6.1-9ubuntu3 [16.1 kB] Get:8
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric/main libgcc1
> i386 1:4.6.1-9ubuntu3 [54.3 kB] Get:9
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> libc6 i386 2.13-20ubuntu5.3 [3944 kB] Get:10
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric/main
> libstdc++6 i386 4.6.1-9ubuntu3 [340 kB] Get:11
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> libtasn1-3 amd64 2.9-4ubuntu0.1 [43.7 kB] Get:12
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> libgnutls26 amd64 2.10.5-1ubuntu3.3 [429 kB] Get:13
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> libkrb5-dev amd64 1.9.1+dfsg-1ubuntu2.3 [12.4 kB] Get:14
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> krb5-multidev amd64 1.9.1+dfsg-1ubuntu2.3 [89.6 kB] Get:15
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> libk5crypto3 amd64 1.9.1+dfsg-1ubuntu2.3 [84.2 kB] Get:16
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> libgssapi-krb5-2 amd64 1.9.1+dfsg-1ubuntu2.3 [118 kB] Get:17
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> libkrb5-3 amd64 1.9.1+dfsg-1ubuntu2.3 [351 kB] Get:18
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> libkrb5support0 amd64 1.9.1+dfsg-1ubuntu2.3 [24.0 kB] Get:19
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> libgssrpc4 amd64 1.9.1+dfsg-1ubuntu2.3 [61.1 kB] Get:20
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> libkadm5srv-mit8 amd64 1.9.1+dfsg-1ubuntu2.3 [53.1 kB] Get:21
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> libkadm5clnt-mit8 amd64 1.9.1+dfsg-1ubuntu2.3 [37.8 kB] Get:22
> http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main
> libexpat1 amd64 2.0.1-7ubuntu3.11.10.1 [131 kB] Fetched 16.1 MB in 2s
> (6305 kB/s)   perl: warning: Setting locale failed. perl: warning:
> Please check that your locale settings:   LANGUAGE = (unset),     LC_ALL =
> (unset),  LC_CTYPE = "UTF-8",     LANG = "en_US.UTF-8"
>     are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to
> default locale: No such file or directory locale: Cannot set LC_ALL to
> default locale: No such file or directory Preconfiguring packages ...
> (Reading database ... 48629 files and directories currently
> installed.) Removing mod-pagespeed-stable:i386 ... Removing apache2
> ... Removing libapache2-mod-php5 ... Module php5 disabled. To activate
> the new configuration, you need to run:   service apache2 restart
> Removing bugzilla3 ... locale: Cannot set LC_CTYPE to default locale:
> No such file or directory locale: Cannot set LC_ALL to default locale:
> No such file or directory /usr/bin/locale: Cannot set LC_CTYPE to
> default locale: No such file or directory /usr/bin/locale: Cannot set
> LC_ALL to default locale: No such file or directory locale: Cannot set
> LC_CTYPE to default locale: No such file or directory locale: Cannot
> set LC_ALL to default locale: No such file or directory Removing
> apache2-mpm-prefork ...  * Stopping web server apache2                
> * The apache2 configtest failed, so we are trying to kill it manually. This is almost certainly suboptimal, so please make sure your system
> is working as you'd expect now!  ... waiting                          
> [ OK ] Removing apache2.2-common ... Removing apache2-utils ...
> Removing apache2.2-bin ... Removing libaprutil1-ldap ... Removing
> libaprutil1-dbd-sqlite3 ... Removing libaprutil1 ... Removing libapr1
> ... Processing triggers for man-db ... locale: Cannot set LC_CTYPE to
> default locale: No such file or directory locale: Cannot set LC_ALL to
> default locale: No such file or directory Processing triggers for
> ureadahead ... Processing triggers for ufw ... WARN: /etc is group
> writable! Processing triggers for libc-bin ... ldconfig deferred
> processing now taking place (Reading database ... 45709 files and
> directories currently installed.) Preparing to replace libc6-dev
> 2.13-20ubuntu5.1 (using .../libc6-dev_2.13-20ubuntu5.3_amd64.deb) ... Unpacking replacement libc6-dev ... Preparing to replace libc-dev-bin
> 2.13-20ubuntu5.1 (using .../libc-dev-bin_2.13-20ubuntu5.3_amd64.deb) ... Unpacking replacement libc-dev-bin ... Processing triggers for
> man-db ... locale: Cannot set LC_CTYPE to default locale: No such file
> or directory locale: Cannot set LC_ALL to default locale: No such file
> or directory dpkg: warning: overriding problem because --force
> enabled:  This is an essential package - it should not be removed.
> dpkg: warning: overriding problem because --force enabled:  This is an
> essential package - it should not be removed. dpkg: warning:
> overriding problem because --force enabled:  This is an essential
> package - it should not be removed. dpkg: warning: overriding problem
> because --force enabled:  This is an essential package - it should not
> be removed. dpkg: warning: overriding problem because --force enabled:
> This is an essential package - it should not be removed. dpkg:
> warning: overriding problem because --force enabled:  This is an
> essential package - it should not be removed. dpkg: warning:
> overriding problem because --force enabled:  This is an essential
> package - it should not be removed. dpkg: warning: overriding problem
> because --force enabled:  This is an essential package - it should not
> be removed. dpkg: warning: overriding problem because --force enabled:
> This is an essential package - it should not be removed. dpkg:
> warning: overriding problem because --force enabled:  This is an
> essential package - it should not be removed. dpkg: warning:
> overriding problem because --force enabled:  This is an essential
> package - it should not be removed. dpkg: warning: overriding problem
> because --force enabled:  This is an essential package - it should not
> be removed. dpkg: warning: overriding problem because --force enabled:
> This is an essential package - it should not be removed. dpkg:
> warning: overriding problem because --force enabled:  This is an
> essential package - it should not be removed. dpkg: warning:
> overriding problem because --force enabled:  This is an essential
> package - it should not be removed. dpkg: warning: overriding problem
> because --force enabled:  This is an essential package - it should not
> be removed. dpkg: libc-bin: dependency problems, but removing anyway
> as you requested:  libc6 depends on libc-bin (= 2.13-20ubuntu5.1).
> (Reading database ... 45614 files and directories currently
> installed.) Removing libc-bin ... Processing triggers for man-db ...
> Can't exec "locale": No such file or directory at
> /usr/share/perl5/Debconf/Encoding.pm line 16. Use of uninitialized
> value $Debconf::Encoding::charmap in scalar chomp at
> /usr/share/perl5/Debconf/Encoding.pm line 17. dpkg: warning:
> 'ldconfig' not found in PATH or not executable. dpkg: error: 1
> expected program not found in PATH or not executable. Note: root's
> PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin. E:
> Sub-process /usr/bin/dpkg returned an error code (2)

After executing what I got from comment I see following error

sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libemail-send-io-perl libgd-text-perl libchart-perl libmime-types-perl libemail-mime-encodings-perl libalgorithm-c3-perl
  libgd-graph3d-perl libclass-load-perl libio-all-perl libgd-gd2-perl libxml-parser-perl libmime-tools-perl libmath-round-perl
  libemail-abstract-perl dbconfig-common libclass-c3-perl libfcgi-perl libdatetime-timezone-perl libgd-graph-perl cvs
  libparams-validate-perl libcgi-pm-perl libemail-mime-contenttype-perl libmro-compat-perl libdatetime-perl libdatetime-locale-perl
  libjs-yui libemail-messageid-perl libfilter-perl libtemplate-plugin-gd-perl libemail-date-format-perl libreturn-value-perl
  libspiffy-perl libperl5.12 libemail-mime-perl liblist-moreutils-perl libemail-send-perl libconvert-binhex-perl libmail-sendmail-perl
  perlmagick libappconfig-perl libsys-hostname-long-perl libemail-simple-perl libclass-singleton-perl libemail-address-perl
  libclass-c3-xs-perl libtemplate-perl
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libc-bin libc6
Suggested packages:
  glibc-doc
The following NEW packages will be installed:
  libc-bin
The following packages will be upgraded:
  libc6
1 upgraded, 1 newly installed, 0 to remove and 148 not upgraded.
2 not fully installed or removed.
Need to get 0 B/5296 kB of archives.
After this operation, 3269 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.
Preconfiguring packages ...
dpkg: warning: 'ldconfig' not found in PATH or not executable.
dpkg: error: 1 expected program not found in PATH or not executable.
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
E: Sub-process /usr/bin/dpkg returned an error code (2)
4
  • how about, sudo apt-get install -f to try for missing packages you accidentally removed. just to make sure.
    – nickanor
    May 13, 2013 at 12:24
  • "This should NOT be done unless you know exactly what you are doing!" And you proceeded? Yikes! Now you've removed libc-bin, the very base of the operating system. Output like "dpkg: warning: 'ldconfig' not found in PATH or not executable." show that you'd better start reinstalling. This server will not come up anymore if you reboot now...
    – gertvdijk
    May 13, 2013 at 12:41
  • @gertvdijk - what can be the solution? May 13, 2013 at 12:45
  • @BharatPatil Get a live CD to repair it with a known good state of your system (advanced), but I'd say: reinstall. You've managed to uninstall all kinds of very essential parts of the OS and you were warned for this.
    – gertvdijk
    May 13, 2013 at 12:45

1 Answer 1

0

You have removed a very important package: libc-bin. Without it various applications (like apt-get) will start to fail.

You can try to recover by downloading and installing manually that package:

wget http://archive.ubuntu.com/ubuntu/pool/main/e/eglibc/libc-bin_2.13-20ubuntu5_amd64.deb
sudo dpkg -i libc-bin*.deb

Check if your architecture matches (the version is the present on 11.10 cd).

Also note that you have removed other packages that may be needed. If you want to get them later you can inspect /var/log/apt/history: there you should find which packages were removed, and install them again with apt-get.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .