kangaroobin has asked for the wisdom of the Perl Monks concerning the following question:

I am very new to working with Perl. After reading an article about it, I very much want to install WWW::Mechanize. I am working on a Mac, so I tried used the pre-installed CPAN module to add it. It was the first time I'd run CPAN, so I let it do the auto install options, which is probably at the root of my problems.

I entered install WWW::Mechanize. Basically, at the end I got this message:

Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible

I thought it might be because I didn't have some other required modules, like LWP or something. So I tried to install Bundle::LWP. I got the same errors at the end.

I probably sound like an idiot, but how can I easily install modules? What am I doing wrong?

Replies are listed 'Best First'.
Re: Installing modules, specifically WWW::Mechanize
by Fletch (Bishop) on Mar 05, 2008 at 04:48 UTC

    Just to toss something out: are you sure you have make available? If you haven't installed the developer tools (the package will be available on your OS media) you're probably going to be missing it (among other things such as a compiler and what not that will also come in handy, erm, compiling things).

    Update: If you have make, this command should produce similar output.

    $ pkgutil --file-info $(which make) volume: / path: usr/bin/make pkgid: com.apple.pkg.DeveloperToolsCLILeo pkg-version: 1.0.0.9000000000.1.1192168948 install-time: 1199144742 uid: 0 gid: 0 mode: 120755

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

      I am not sure. How would I check?

      Update: I suppose not, then. Here's what I got:

      $ pkgutil --file-info $(which make) -bash: pkgutil: command not found

      I need to install the developer tools for Mac now?

Re: Installing modules, specifically WWW::Mechanize
by anthski (Scribe) on Mar 05, 2008 at 03:56 UTC
    It appears that there is a compilation error (hence why 'make' has a bad status), but why this is the case isn't evident from the 4 lines that you have included. Can you include more of the output (preferably all of it) ?

      Sure thing. It's long, but whatever.

      cpan> install WWW::Mechanize Running install for module WWW::Mechanize Running make for P/PE/PETDANCE/WWW-Mechanize-1.34.tar.gz CPAN: Digest::MD5 loaded ok CPAN: Compress::Zlib loaded ok Checksum for /Users/username/.cpan/sources/authors/id/P/PE/PETDANCE/WW +W-Mechanize-1.34.tar.gz ok Scanning cache /Users/username/.cpan/build for sizes WWW-Mechanize-1.34/ WWW-Mechanize-1.34/bin/ WWW-Mechanize-1.34/bin/mech-dump WWW-Mechanize-1.34/Changes WWW-Mechanize-1.34/etc/ WWW-Mechanize-1.34/etc/www-mechanize-logo.png WWW-Mechanize-1.34/lib/ WWW-Mechanize-1.34/lib/WWW/ WWW-Mechanize-1.34/lib/WWW/Mechanize/ WWW-Mechanize-1.34/lib/WWW/Mechanize/Cookbook.pod WWW-Mechanize-1.34/lib/WWW/Mechanize/Examples.pod WWW-Mechanize-1.34/lib/WWW/Mechanize/FAQ.pod WWW-Mechanize-1.34/lib/WWW/Mechanize/Image.pm WWW-Mechanize-1.34/lib/WWW/Mechanize/Link.pm WWW-Mechanize-1.34/lib/WWW/Mechanize.pm WWW-Mechanize-1.34/Makefile.PL WWW-Mechanize-1.34/MANIFEST WWW-Mechanize-1.34/META.yml WWW-Mechanize-1.34/perlcriticrc WWW-Mechanize-1.34/t/ WWW-Mechanize-1.34/t/00-load.t WWW-Mechanize-1.34/t/add_header.t WWW-Mechanize-1.34/t/aliases.t WWW-Mechanize-1.34/t/area_link.html WWW-Mechanize-1.34/t/area_link.t WWW-Mechanize-1.34/t/autocheck.t WWW-Mechanize-1.34/t/clone.t WWW-Mechanize-1.34/t/die.t WWW-Mechanize-1.34/t/field.html WWW-Mechanize-1.34/t/field.t WWW-Mechanize-1.34/t/find_frame.html WWW-Mechanize-1.34/t/find_frame.t WWW-Mechanize-1.34/t/find_image.t WWW-Mechanize-1.34/t/find_inputs.html WWW-Mechanize-1.34/t/find_inputs.t WWW-Mechanize-1.34/t/find_link-warnings.t WWW-Mechanize-1.34/t/find_link.html WWW-Mechanize-1.34/t/find_link.t WWW-Mechanize-1.34/t/find_link_id.html WWW-Mechanize-1.34/t/find_link_id.t WWW-Mechanize-1.34/t/form-parsing.t WWW-Mechanize-1.34/t/frames.html WWW-Mechanize-1.34/t/frames.t WWW-Mechanize-1.34/t/google.html WWW-Mechanize-1.34/t/image-new.t WWW-Mechanize-1.34/t/image-parse.html WWW-Mechanize-1.34/t/image-parse.t WWW-Mechanize-1.34/t/link-base.t WWW-Mechanize-1.34/t/link-relative.t WWW-Mechanize-1.34/t/link.t WWW-Mechanize-1.34/t/live/ WWW-Mechanize-1.34/t/live/computers4sure.t WWW-Mechanize-1.34/t/live/wikipedia.t WWW-Mechanize-1.34/t/local/ WWW-Mechanize-1.34/t/local/back.t WWW-Mechanize-1.34/t/local/click.t WWW-Mechanize-1.34/t/local/click_button.t WWW-Mechanize-1.34/t/local/failure.t WWW-Mechanize-1.34/t/local/follow.t WWW-Mechanize-1.34/t/local/form.t WWW-Mechanize-1.34/t/local/get.t WWW-Mechanize-1.34/t/local/LocalServer.pm WWW-Mechanize-1.34/t/local/log-server WWW-Mechanize-1.34/t/local/overload.t WWW-Mechanize-1.34/t/local/page_stack.t WWW-Mechanize-1.34/t/local/referer-server WWW-Mechanize-1.34/t/local/referer.t WWW-Mechanize-1.34/t/local/reload.t WWW-Mechanize-1.34/t/local/submit.t WWW-Mechanize-1.34/t/mech-dump/ WWW-Mechanize-1.34/t/mech-dump/mech-dump.t WWW-Mechanize-1.34/t/new.t WWW-Mechanize-1.34/t/pod-coverage.t WWW-Mechanize-1.34/t/pod.t WWW-Mechanize-1.34/t/regex-error.t WWW-Mechanize-1.34/t/save_content.t WWW-Mechanize-1.34/t/select.html WWW-Mechanize-1.34/t/select.t WWW-Mechanize-1.34/t/taint.t WWW-Mechanize-1.34/t/tick.html WWW-Mechanize-1.34/t/tick.t WWW-Mechanize-1.34/t/upload.html WWW-Mechanize-1.34/t/upload.t WWW-Mechanize-1.34/t/warn.t WWW-Mechanize-1.34/t/warnings.t Removing previously used /Users/username/.cpan/build/WWW-Mechanize-1.3 +4 CPAN.pm: Going to build P/PE/PETDANCE/WWW-Mechanize-1.34.tar.gz WWW::Mechanize likes to have a lot of test modules for some of its tes +ts. The following are modules that would be nice to have, but not required +. Test::Pod Test::Memory::Cycle Test::Warn Test::Taint Checking if your kit is complete... Looks good Warning: prerequisite HTML::Form 1.038 not found. Warning: prerequisite HTML::TokeParser 2.28 not found. Warning: prerequisite HTTP::Daemon 0 not found. Warning: prerequisite HTTP::Request 1.3 not found. Warning: prerequisite HTTP::Status 0 not found. Warning: prerequisite LWP 5.802 not found. Warning: prerequisite LWP::UserAgent 2.024 not found. Writing Makefile for WWW::Mechanize ---- Unsatisfied dependencies detected during [P/PE/PETDANCE/WWW-Mecha +nize-1.34.tar.gz] ----- HTML::Form HTTP::Status LWP::UserAgent HTTP::Daemon HTTP::Request LWP Shall I follow them and prepend them to the queue of modules we are processing right now? [yes] yes Running make test Delayed until after prerequisites Running make install Delayed until after prerequisites Running install for module HTML::Form Running make for G/GA/GAAS/libwww-perl-5.808.tar.gz Checksum for /Users/username/.cpan/sources/authors/id/G/GA/GAAS/libwww +-perl-5.808.tar.gz ok libwww-perl-5.808/ libwww-perl-5.808/lib/ libwww-perl-5.808/lib/HTTP/ libwww-perl-5.808/lib/HTTP/Cookies.pm libwww-perl-5.808/lib/HTTP/Status.pm libwww-perl-5.808/lib/HTTP/Cookies/ libwww-perl-5.808/lib/HTTP/Cookies/Netscape.pm libwww-perl-5.808/lib/HTTP/Cookies/Microsoft.pm libwww-perl-5.808/lib/HTTP/Request/ libwww-perl-5.808/lib/HTTP/Request/Common.pm libwww-perl-5.808/lib/HTTP/Headers/ libwww-perl-5.808/lib/HTTP/Headers/Auth.pm libwww-perl-5.808/lib/HTTP/Headers/ETag.pm libwww-perl-5.808/lib/HTTP/Headers/Util.pm libwww-perl-5.808/lib/HTTP/Request.pm libwww-perl-5.808/lib/HTTP/Response.pm libwww-perl-5.808/lib/HTTP/Date.pm libwww-perl-5.808/lib/HTTP/Daemon.pm libwww-perl-5.808/lib/HTTP/Message.pm libwww-perl-5.808/lib/HTTP/Negotiate.pm libwww-perl-5.808/lib/HTTP/Headers.pm libwww-perl-5.808/lib/LWP/ libwww-perl-5.808/lib/LWP/Protocol/ libwww-perl-5.808/lib/LWP/Protocol/nntp.pm libwww-perl-5.808/lib/LWP/Protocol/ftp.pm libwww-perl-5.808/lib/LWP/Protocol/mailto.pm libwww-perl-5.808/lib/LWP/Protocol/GHTTP.pm libwww-perl-5.808/lib/LWP/Protocol/nogo.pm libwww-perl-5.808/lib/LWP/Protocol/file.pm libwww-perl-5.808/lib/LWP/Protocol/loopback.pm libwww-perl-5.808/lib/LWP/Protocol/data.pm libwww-perl-5.808/lib/LWP/Protocol/https10.pm libwww-perl-5.808/lib/LWP/Protocol/http10.pm libwww-perl-5.808/lib/LWP/Protocol/https.pm libwww-perl-5.808/lib/LWP/Protocol/gopher.pm libwww-perl-5.808/lib/LWP/Protocol/cpan.pm libwww-perl-5.808/lib/LWP/Protocol/http.pm libwww-perl-5.808/lib/LWP/RobotUA.pm libwww-perl-5.808/lib/LWP/Authen/ libwww-perl-5.808/lib/LWP/Authen/Ntlm.pm libwww-perl-5.808/lib/LWP/Authen/Digest.pm libwww-perl-5.808/lib/LWP/Authen/Basic.pm libwww-perl-5.808/lib/LWP/MemberMixin.pm libwww-perl-5.808/lib/LWP/media.types libwww-perl-5.808/lib/LWP/DebugFile.pm libwww-perl-5.808/lib/LWP/Debug.pm libwww-perl-5.808/lib/LWP/UserAgent.pm libwww-perl-5.808/lib/LWP/MediaTypes.pm libwww-perl-5.808/lib/LWP/Protocol.pm libwww-perl-5.808/lib/LWP/ConnCache.pm libwww-perl-5.808/lib/LWP/Simple.pm libwww-perl-5.808/lib/WWW/ libwww-perl-5.808/lib/WWW/RobotRules/ libwww-perl-5.808/lib/WWW/RobotRules/AnyDBM_File.pm libwww-perl-5.808/lib/WWW/RobotRules.pm libwww-perl-5.808/lib/File/ libwww-perl-5.808/lib/File/Listing.pm libwww-perl-5.808/lib/Net/ libwww-perl-5.808/lib/Net/HTTP/ libwww-perl-5.808/lib/Net/HTTP/Methods.pm libwww-perl-5.808/lib/Net/HTTP/NB.pm libwww-perl-5.808/lib/Net/HTTP.pm libwww-perl-5.808/lib/Net/HTTPS.pm libwww-perl-5.808/lib/Bundle/ libwww-perl-5.808/lib/Bundle/LWP.pm libwww-perl-5.808/lib/LWP.pm libwww-perl-5.808/lib/HTML/ libwww-perl-5.808/lib/HTML/Form.pm libwww-perl-5.808/t/ libwww-perl-5.808/t/base/ libwww-perl-5.808/t/base/headers-util.t libwww-perl-5.808/t/base/status.t libwww-perl-5.808/t/base/cookies.t libwww-perl-5.808/t/base/headers-etag.t libwww-perl-5.808/t/base/http.t libwww-perl-5.808/t/base/date.t libwww-perl-5.808/t/base/listing.t libwww-perl-5.808/t/base/response.t libwww-perl-5.808/t/base/headers-auth.t libwww-perl-5.808/t/base/common-req.t libwww-perl-5.808/t/base/protocols.t libwww-perl-5.808/t/base/message.t libwww-perl-5.808/t/base/mediatypes.t libwww-perl-5.808/t/base/ua.t libwww-perl-5.808/t/base/headers.t libwww-perl-5.808/t/base/negotiate.t libwww-perl-5.808/t/base/message-old.t libwww-perl-5.808/t/base/message-parts.t libwww-perl-5.808/t/live/ libwww-perl-5.808/t/live/apache.t libwww-perl-5.808/t/live/jigsaw-te.t libwww-perl-5.808/t/live/jigsaw-md5-get.t libwww-perl-5.808/t/live/jigsaw-neg.t libwww-perl-5.808/t/live/jigsaw-auth-d.t libwww-perl-5.808/t/live/apache-listing.t libwww-perl-5.808/t/live/jigsaw-md5.t libwww-perl-5.808/t/live/jigsaw-neg-get.t libwww-perl-5.808/t/live/jigsaw-chunk.t libwww-perl-5.808/t/live/jigsaw-auth-b.t libwww-perl-5.808/t/local/ libwww-perl-5.808/t/local/get.t libwww-perl-5.808/t/local/autoload.t libwww-perl-5.808/t/local/chunked.t libwww-perl-5.808/t/local/http.t libwww-perl-5.808/t/local/http-get.t libwww-perl-5.808/t/local/autoload-get.t libwww-perl-5.808/t/local/protosub.t libwww-perl-5.808/t/net/ libwww-perl-5.808/t/net/http-get.t libwww-perl-5.808/t/net/cgi-bin/ libwww-perl-5.808/t/net/cgi-bin/nph-slowdata libwww-perl-5.808/t/net/cgi-bin/moved libwww-perl-5.808/t/net/cgi-bin/test libwww-perl-5.808/t/net/cgi-bin/slowread libwww-perl-5.808/t/net/cgi-bin/timeout libwww-perl-5.808/t/net/proxy.t libwww-perl-5.808/t/net/http-post.t libwww-perl-5.808/t/net/moved.t libwww-perl-5.808/t/net/http-timeout.t libwww-perl-5.808/t/net/config.pl.dist libwww-perl-5.808/t/net/mirror.t libwww-perl-5.808/t/robot/ libwww-perl-5.808/t/robot/rules.t libwww-perl-5.808/t/robot/ua.t libwww-perl-5.808/t/robot/ua-get.t libwww-perl-5.808/t/robot/rules-dbm.t libwww-perl-5.808/t/README libwww-perl-5.808/t/html/ libwww-perl-5.808/t/html/form-param.t libwww-perl-5.808/t/html/form.t libwww-perl-5.808/t/TEST libwww-perl-5.808/bin/ libwww-perl-5.808/bin/lwp-rget libwww-perl-5.808/bin/lwp-mirror libwww-perl-5.808/bin/lwp-download libwww-perl-5.808/bin/lwp-request libwww-perl-5.808/Makefile.PL libwww-perl-5.808/talk-to-ourself libwww-perl-5.808/lwptut.pod libwww-perl-5.808/MANIFEST libwww-perl-5.808/README.SSL libwww-perl-5.808/Changes libwww-perl-5.808/AUTHORS libwww-perl-5.808/README libwww-perl-5.808/lwpcook.pod Removing previously used /Users/username/.cpan/build/libwww-perl-5.808 CPAN.pm: Going to build G/GA/GAAS/libwww-perl-5.808.tar.gz This package comes with some sample programs that I can try to install in /usr/bin. Note that you can avoid these questions by passing the '-n' option to 'Makefile.PL'. Do you want to install lwp-request? [y] y Do you want to install lwp-mirror? [y] y Do you want to install lwp-rget? [y] y Do you want to install lwp-download? [y] y The lwp-request program will use the name it is invoked with to determine what HTTP method to use. I can set up alias for the most common HTTP methods. These alias are also installed in /usr/bin. Do you want to install the GET alias? [n] n Do you want to install the HEAD alias? [n] n Do you want to install the POST alias? [n] n Checking for URI........... ok Checking for HTML::Parser.. ok Checking for MIME::Base64.. ok Checking for Net::FTP...... ok Checking for Digest::MD5 .. ok Checking if your kit is complete... Looks good Warning: prerequisite HTML::Tagset 0 not found. Writing Makefile for LWP ---- Unsatisfied dependencies detected during [G/GA/GAAS/libwww-perl-5 +.808.tar.gz] ----- HTML::Tagset Shall I follow them and prepend them to the queue of modules we are processing right now? [yes] yes Running make test Delayed until after prerequisites Running make install Delayed until after prerequisites Running install for module HTML::Tagset Running make for P/PE/PETDANCE/HTML-Tagset-3.20.tar.gz Checksum for /Users/username/.cpan/sources/authors/id/P/PE/PETDANCE/HT +ML-Tagset-3.20.tar.gz ok HTML-Tagset-3.20/ HTML-Tagset-3.20/Tagset.pm HTML-Tagset-3.20/Makefile.PL HTML-Tagset-3.20/META.yml HTML-Tagset-3.20/MANIFEST.SKIP HTML-Tagset-3.20/MANIFEST HTML-Tagset-3.20/README HTML-Tagset-3.20/t/ HTML-Tagset-3.20/t/01_old_junk.t HTML-Tagset-3.20/t/pod.t HTML-Tagset-3.20/t/00_about_verbose.t HTML-Tagset-3.20/Changes Removing previously used /Users/username/.cpan/build/HTML-Tagset-3.20 CPAN.pm: Going to build P/PE/PETDANCE/HTML-Tagset-3.20.tar.gz Checking if your kit is complete... Looks good Writing Makefile for HTML::Tagset -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible Running make for G/GA/GAAS/libwww-perl-5.808.tar.gz Is already unwrapped into directory /Users/username/.cpan/build/libw +ww-perl-5.808 CPAN.pm: Going to build G/GA/GAAS/libwww-perl-5.808.tar.gz -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible Running install for module HTTP::Status Running make for G/GA/GAAS/libwww-perl-5.808.tar.gz Is already unwrapped into directory /Users/username/.cpan/build/libw +ww-perl-5.808 Has already been processed within this session Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible Running install for module LWP::UserAgent Running make for G/GA/GAAS/libwww-perl-5.808.tar.gz Is already unwrapped into directory /Users/username/.cpan/build/libw +ww-perl-5.808 Has already been processed within this session Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible Running install for module HTTP::Daemon Running make for G/GA/GAAS/libwww-perl-5.808.tar.gz Is already unwrapped into directory /Users/username/.cpan/build/libw +ww-perl-5.808 Has already been processed within this session Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible Running install for module HTTP::Request Running make for G/GA/GAAS/libwww-perl-5.808.tar.gz Is already unwrapped into directory /Users/username/.cpan/build/libw +ww-perl-5.808 Has already been processed within this session Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible Running install for module LWP Running make for G/GA/GAAS/libwww-perl-5.808.tar.gz Is already unwrapped into directory /Users/username/.cpan/build/libw +ww-perl-5.808 Has already been processed within this session Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible Running make for P/PE/PETDANCE/WWW-Mechanize-1.34.tar.gz Is already unwrapped into directory /Users/username/.cpan/build/WWW- +Mechanize-1.34 CPAN.pm: Going to build P/PE/PETDANCE/WWW-Mechanize-1.34.tar.gz -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible

        The original error is here:

        Writing Makefile for HTML::Tagset -- NOT OK

        This means that something went wrong when Perl tried to install HTML::Tagset. Maybe run that one alone to see the part better where it fails.