0

I am installing Mysql server on Fedora.

When running this command:

[sugumar@localhost softwares]$ rpm -i MySQL-server-5.6.21-1.el6.i686.rpm 

it shows the following error

error: Failed dependencies:
    /usr/bin/perl is needed by MySQL-server-5.6.21-1.el6.i686

So I have installed Perl:

Downloaded Activeperl tarball:

  1. tar -xzvf Activeper.tar.gz
  2. cd Activeperl
  3. sh install.sh

    Enter top level directory for install [/opt/Activeperl]: yes
    

But still when I try to install Mysql, it shows the same error

error: Failed dependencies:
    /usr/bin/perl is needed by MySQL-server-5.6.21-1.el6.i686

What should I do?

Gryu
  • 2,102
  • 2
  • 16
  • 29
Sugumar Venkatesan
  • 4,019
  • 8
  • 46
  • 77

4 Answers4

3

Run Following command

rpm -ivh --nodeps MySQL-server-5.6.21-1.el6.i686.rpm

Try install with no dependencies(nodeps), mostly you wont receive this dependency errors

Jaimil Patel
  • 1,301
  • 6
  • 13
2

rpm only knows that software is installed if it is noted in the rpm database. That only happens if you use rpm (or yum or, probably, packagekit) to install the software. Just installing ActivePerl like that isn't going to change anything.

As you seem to have the MySQL rpm downloaded already, you can use yum's "localinstall" feature to install a local rpm and all of its dependencies.

$ yum localinstall MySQL-server-5.6.21-1.el6.i686.rpm

But, like others, I'm really surprised that your system doesn't already have Perl installed. I'd be very wary of a system in that condition.

Dave Cross
  • 68,119
  • 3
  • 51
  • 97
0

Perhaps your perl is installed at /bin, not /usr/bin? Try to make a symbolic link for it. In fact, many applications/scripts have their default perl path, either /usr/bin/perl or /bin/perl. So, in my machine, I always have both paths pointing to perl (one physical, one symbolic).

check if you perl is in /bin or /usr/bin

ls -l /bin/perl
ls -l /usr/bin/perl

If that's the problem, try to make a symbolic link:

ln -s /bin/perl /usr/bin/perl

Robin Hsu
  • 4,164
  • 3
  • 20
  • 37
  • Don't do that!! `/bin` and `/usr/bin` are managed by the Fedora package management system, don't touch it with anything else! – reinierpost Nov 07 '14 at 08:38
  • So, how do you solve the problem: If I import lots of custom perl scripts from 3rd party, some with `#!/usr/bin/perl`, some with `#!/bin/perl`? Not to say that if you have many different Unix machines, while some installs perl at /usr/bin, and some at /bin? Are you saying to modify the script rather than modify the system? How about if these scripts are shared and network mounted by different machines? In fact, I have seen some Linux distribution applying this trick in the first place when you install that distribution. – Robin Hsu Nov 07 '14 at 09:00
  • Some Unix installs perl at /usr/local/bin, or even /opt/local/bin – Robin Hsu Nov 07 '14 at 09:10
  • I think this is the quickest way to resolve it and as the question says I got my default installation done at `/opt/Activeperl` directory. I created a soft link `ln -s /opt/ActivePerl/bin/perl /usr/bin/perl` but I am still getting the same error. Although if I do `perl -v` I could see the perl is installed. I am not sure if I am missing something. – sabertooth1990 Jul 20 '17 at 08:12
  • perhaps your perl installation is incomplete. Try official package installation methods, such as RPM for Redhat series, or apt-get for Debian series, etc.. – Robin Hsu Aug 03 '17 at 15:37
0

Install the Perl supplied with Fedora:

sudo yum install perl

This should give you /usr/bin/perl (and a lot more).

But how could it go missing in the first place? Looks like someone's been messing with your system.

reinierpost
  • 8,425
  • 1
  • 38
  • 70