Bash – What to do if bash scripts come with an incorrect interpreter path

bashinstallationperlscripting

I'm trying to install BugZilla on our server. The issue is that perl scripts of BugZilla define the path as /usr/bin/perl, and my perl installation is located at /usr/local/bin/perl.

I've had this issue while installing other applications as well, i had to manually edit the interpreter paths.

How do you handle situations like these?

EDIT: I just noticed we've got two copies of perl on the server, one in the standard location, on in /usr/local/bin/perl, but which perl returns the former path.

Btw, here's the error I get when I run bugzilla's perl script

bash: ./checksetup.pl: /usr/bin/perl: bad interpreter: Permission denied

Best Answer

You can create a soft link using ln that links /usr/bin/perl to /usr/local/bin/perl

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