1

I'm getting a very weird error when installing pure-ftpd on my Ubuntu 12.04.04 LTS server.

I'm running this command, with a sudo user.

sudo apt-get install pure-ftpd

and I get this error

Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up pure-ftpd (1.0.35-1) ...
Starting ftp server: File/Basename.pm did not return a true value at /usr/sbin/pure-ftpd-wrapper line 23.
BEGIN failed--compilation aborted at /usr/sbin/pure-ftpd-wrapper line 23.
invoke-rc.d: initscript pure-ftpd, action "start" failed.
dpkg: error processing pure-ftpd (--configure):
 subprocess installed post-installation script returned error exit status 5
Errors were encountered while processing:
 pure-ftpd
E: Sub-process /usr/bin/dpkg returned an error code (1)

and then it just aborts the installation. I've installed pure-ftpd on my other machine just fine this way.

2
  • Lucky I have a 12.04 LTS server running right now, I'll test this. Feb 13, 2014 at 1:26
  • Thank you Vasili! I installed it on my other 12.04 LTS machine just fine, but it doesn't work on this machine for some reason. Feb 13, 2014 at 1:37

1 Answer 1

1

Preliminary Steps

Clean up your packages and update the cache:

sudo apt-get purge pure-ftpd
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get update

Then try again:

sudo apt-get install pure-ftpd

If reinstalling PureFtpd doesn't work

This is line 23 of /usr/sbin/pure-ftpd-wrapper:

use File::Basename;

File::Basename is a Perl module. I tried installing it using:

$ cpan
cpan[1]> install File::Basename

But the install failed with the error:

Make had returned bad status, install seems impossible

However, it did mention that File::Basename is part of the perl-5.18.2 distribution.
So I upgraded Perl:

sudo apt-get upgrade perl --no-install-recommends

After that I could verify that it was installed using:

$ cpan
cpan[1]> i File::Basename

If you cannot install the Perl module

Question: When you use cpan and type i File::Basename, what comes up?

Response:

autouse.pm did not return a true value at /usr/share/perl/5.14/App/Cpan.pm line 182. BEGIN failed--compilation aborted at /usr/share/perl/5.14/App/Cpan.pm line 182. Compilation failed in require at /usr/bin/cpan line 8. BEGIN failed--compilation aborted at /usr/bin/cpan line 8.

Next Step:

Reinstall perl with

sudo apt-get install Perl --reinstall

OR

sudo apt-get purge Perl
sudo apt-get install Perl

(WARNING: Purging Perl can affect a LOT of dependencies and other applications)

8
  • I'm quite new to Linux, I tried running the same upgrade on perl but it seems as it didn't upgrade it, or I'm running the latest version of it. Feb 13, 2014 at 2:13
  • when you use cpan and type i File::Basename, what comes up? Feb 13, 2014 at 2:55
  • This comes up after I type cpan: autouse.pm did not return a true value at /usr/share/perl/5.14/App/Cpan.pm line 182. BEGIN failed--compilation aborted at /usr/share/perl/5.14/App/Cpan.pm line 182. Compilation failed in require at /usr/bin/cpan line 8. BEGIN failed--compilation aborted at /usr/bin/cpan line 8. Feb 13, 2014 at 3:04
  • That suggests there is an issue with Perl itself............ Completely reinstall Perl and see how that goes. apt-get purge perl Feb 13, 2014 at 3:19
  • That removed my MySQL server, well I got a fresh backup of it so it's fine. Although when removing perl, the system went into read-only mode, so couldn't do anything. I will have to reboot the machine. Feb 13, 2014 at 3:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.