3

I'm a completely new to Perl, and I'm having trouble installing perlbrew. Someone was helping me, but he's busy all day today, so I'm trying to figure this out on my own. I installed the perlbrew root and modified the bashrc, but now I can't install any version of perlbrew (5.14.2 or any other). This is the error I receive:

Installing /Users/wuzl/perl5/perlbrew/build/perl-5.14.2 failed.
See /Users/wuzl/perl5/perlbrew/build.log to see why.
If you want to force install the distribution, try:

  perlbrew --force install perl-5.14.2

I tried the force install, and that didn't work either. So I checked the log, it said a whole bunch of stuff, and at the end:

I can't find make or gmake, and my life depends on it.
Go find a public domain implementation or fix your PATH setting!
sh: make: command not found
sh: make: command not found

What does that mean?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
matthewb
  • 1,323
  • 2
  • 12
  • 18
  • 3
    Just like the error message says, install `make` or `gmake`. You're probably not on a Unix/Linux system, otherwise you'd probably already have `make`. So, if you're on any kind of Windows system, find and install `gmake`. –  Dec 08 '11 at 18:53
  • 1
    That's the confusing part, I'm on a Mac, which is Linux, correct? – matthewb Dec 08 '11 at 18:55
  • 1
    Strictly speaking, the Mac OS is a branded UNIX. That said, there is still no requirement to include development tools. – JRFerguson Dec 08 '11 at 19:01
  • 5
    OS X is not Linux. The kernel is derived from Mach 3 and BSD. – Quentin Dec 08 '11 at 19:08
  • 1
    matthewb: in order to get the 'make' program on a mac, you need to install XCode, which is available for free from Apple's site. – Ether Jun 13 '12 at 21:04

2 Answers2

6

You'll need to install the MacOS developer tools. If you're on a current version of MacOS, you can get the Xcode installer for free via the App Store. Otherwise, the installer is on the software DVDs that came with your computer.

Once the development tools are installed, you will have gcc and make and will be able to compile perlbrew.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
friedo
  • 65,762
  • 16
  • 114
  • 184
  • Great, thanks a lot for the help. After installing XCode, I was able to install perlbrew. However, now I can't install cpanminus, I'm getting this error: ERROR: Can't create '/usr/local/bin' mkdir /usr/local/bin: Permission denied at /Users/bussem/.cpan/build/ExtUtils-Install-1.54-BrmvVv/blib/lib/ExtUtils/Install.pm line 483 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! at -e line 1 make: *** [pure_site_install] Error 13 MIYAGAWA/App-cpanminus-1.5006.tar.gz make install -- NOT OK Warning (usually harmless): 'YAML' not installed, will not store persistent stat – matthewb Dec 08 '11 at 20:29
  • @user1088336 - Well, it's a permission issue. Fix it. –  Dec 08 '11 at 20:40
  • 2
    You're running the install as an unprivileged user (which is good.) If you want `cpanminus` installed on your *system* perl (which you probably don't) you can do it via `sudo`. However, what you probably want to do is use `perlbrew` to install a Perl in your own user directory, then use `perlbrew switch` to use that `perl` (confirm it by using `which perl` to see which one you're running.) Then you can install `cpanminus` as your own user. – friedo Dec 08 '11 at 20:44
5

You need an environment that supports compilation. The 'make' command is part of that process and you're missing that utility. It would appear that you are running the Mac OS. You need a C compilation environment 'XCode 4'. Your install disks or the online APP store offers it.

JRFerguson
  • 7,426
  • 2
  • 32
  • 36