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?

dhag
  • 15,736
  • 4
  • 55
  • 65
Shad
  • 43
  • 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 '15 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 '15 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. – Mark Plotnick Mar 18 '15 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. – Warren Young Mar 18 '15 at 23:05
  • @WarrenYoung: If the OP had the name of the Perl script wrong, the error message would have been bash: ./VMware-install.pl: No such file or directory. – Scott - Слава Україні Mar 18 '15 at 23:12
  • 1
    @WarrenYoung If OP is running that file from a FAT or VFAT filesystem, that would explain everything... – Mark Plotnick Mar 18 '15 at 23:40
  • @MarkPlotnick: Or NTFS, or HFS+, or ISO9960, or UDF... (Some of those can be case-sensitive, but not as a default.) – Warren Young Mar 18 '15 at 23:54
  • Could be a DOS-style endline. You can try /usr/bin/perl ./VMware-install.pl . – Aaron D. Marasco Mar 18 '15 at 23:56
  • I got the OS, perl, and program as a Kickstart package because this VM will be supporting a standalone Navy application. I did NOT select the OS. – Shad Mar 20 '15 at 00:44
  • As for the rwx of the perl, it has full rights across each category. How should the default settings for perl be set? As for the VMware-install.pl, it is located in the directory called vmware-tools-distrib. When I get back into work tomorrow, I will try the options listed. Thanks. – Shad Mar 20 '15 at 00:50

3 Answers3

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.

Mike S
  • 2,502
  • 2
  • 18
  • 29
  • The Hello World worked. When I performed the perl with the VMware install, it executed the script properly. Thanks. – Shad Mar 20 '15 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
Wildcard
  • 36,499
human42
  • 21
  • Can you tell me how my guess is incorrect? – human42 Nov 25 '16 at 00:21
  • OK, my bad. But I don't see why /usr/bin/perl ./VMware-install.pl worked. – human42 Nov 25 '16 at 06: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 '16 at 07: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 '16 at 08: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

pd12
  • 197