1

On my ubuntu 15.04 server the apt-get command won't work. I think it has something to do with perl. Does anyone know how to fix it? I've already tried apt-get -f install, but that outputs the same error..

Thanks for helping me out

This is the error I receive:

root@xxx:~# apt-get install lynx
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libncurses5 libncursesw5 libtinfo5 lynx-cur
The following NEW packages will be installed:
  lynx lynx-cur
The following packages will be upgraded:
  libncurses5 libncursesw5 libtinfo5
3 upgraded, 2 newly installed, 0 to remove and 568 not upgraded.
4 not fully installed or removed.
Need to get 0 B/2426 kB of archives.
After this operation, 5731 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
WARNING: The following packages cannot be authenticated!
  libtinfo5 libncursesw5 libncurses5 lynx-cur lynx
Install these packages without verification? [y/N] y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        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.
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)
  • have you executed sudo apt-get update prior to this command? –  Jan 14 '16 at 13:14
  • I do, but then i receive the following error: W: GPG error: http://ftp.debian.org experimental InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010 – Luuk Isbouts Jan 14 '16 at 13:20
  • Maybe this can help: http://askubuntu.com/questions/13065/how-do-i-fix-the-gpg-error-no-pubkey – Parto Jan 14 '16 at 13:28
  • You are using Debian archive on Ubuntu, which surely will bring you all sorts of problems. You should never do that, and should now remove all debian archives found in /etc/apt/sources.list and /etc/apt/sources.list.d/. – Anthony Wong Jan 14 '16 at 13:29
  • Please run echo $PATH in a root prompt and post the output. – kos Jan 14 '16 at 13:32
  • 'ldconfig' not found in PATH or not executable That doesn't look good. – fkraiem Jan 14 '16 at 14:03
  • Perhaps exiting from the root shell (whose PATH seems to be messed up) and using sudo (which should have its own secure_path) might make a difference? – steeldriver Jan 14 '16 at 16:15
  • Output from echo $PATH: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games'.

    Creating a new user didn't do the trick for me..

    – Luuk Isbouts Jan 14 '16 at 17:10

0 Answers0