4

I installed RHEL 5.1 on a virtual machine. I would like to install VMware Tools, but I keep getting an error. I am performing the installation via the tar procedure. I get the following error:

bash: ./VMware-install.pl: /usr/bin/perl: bad interpreter: Permission denied

The ./VMware-install.pl and /usr/bin/perl files have full rwx permissions, but I keep getting the same error.

Does anyone know how to fix this?

10
  • 4
    First of all: 5.1 had end of support 5 years ago. cough Did you by any chance install a 64-bit perl on a 32-bit OS?
    – tink
    Mar 18, 2015 at 21:30
  • 1
    I'd suggest running ls -l /usr/bin/perl so we can see the exact permissions... which should not be rwxrwxrwx.
    – dhag
    Mar 18, 2015 at 21:35
  • 1
    The filesystem the VMware-install.pl files may have noexec permission. What directory is VMware-install.pl in? If it's /tmp, try copying all the stuff to a different directory. Mar 18, 2015 at 21:36
  • Are you sure about the capitalization? That program's been named all-lowercase for as long as I've been using VMware products, which is an awfully long time. Mar 18, 2015 at 23:05
  • 1
    @WarrenYoung If OP is running that file from a FAT or VFAT filesystem, that would explain everything... Mar 18, 2015 at 23:40

3 Answers 3

4

Simplify your situation: This is not a VMware install problem, it's a "Why doesn't the system recognize /usr/bin/perl?" problem. Once that's fixed, you should be able to install VMware... at least, you've overcome the first hurdle.

So, try: /usr/bin/perl -e 'print "Hello, world\n";' and see what you get. This will be your first clue into the underlying problem.

If it works, try /usr/bin/perl ./VMware-install.pl

If it doesn't work, it's something weird and will probably take more investigation, such as what filesystem perl is located on and such.

But I'd start at zooming in on /usr/bin/perl.

1
  • The Hello World worked. When I performed the perl with the VMware install, it executed the script properly. Thanks.
    – Shad
    Mar 20, 2015 at 14:20
2

I had this exact same problem, and the same error message. In my case it was a permissions problem: The script lacked execution permision.

When I turned on execution permission on the script, it was solved in my case. Like so:

$ chmod u+x ./VMware-install.pl
4
  • Can you tell me how my guess is incorrect?
    – human42
    Nov 25, 2016 at 0:21
  • OK, my bad. But I don't see why /usr/bin/perl ./VMware-install.pl worked.
    – human42
    Nov 25, 2016 at 6:59
  • I wrote my answer because I ran into a problem with this exact error message and landed on this page looking for a solution before I found it myself. I obviously didn't notice the remark about the permissions.
    – human42
    Nov 25, 2016 at 7:08
  • 1
    In that case, you did exactly the right thing by posting an answer as it wasn't a guess at all, but a working solution for encountering the same problem. I've reversed my vote and deleted my previous comments. Thanks for contributing to the site!
    – Wildcard
    Nov 25, 2016 at 8:21
0

Running perl ./yourfile.pl should work as Mike suggested.

It's probably a problem in the script calling #!/usr/bin/perl instead of #!/usr/bin/env perl

See Bash Script Permission denied & Bad Interpreter or man env

You must log in to answer this question.

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