When I tried "brew install libgd" it said gd 2.2.5 is already installed and up-to-date. When I tried cpan install GD, it said CPAN.pm requires configuration and I just used all the default. However, it said that I do not have write permission for Perl library directories. So I continued with the default "local::lib" and it seems everything is okay and said GD is up to date (2.71).

So I rerun the perl script and received the same error. One thing that I noticed is that the "/Library/Perl/5.18/darwin...." is still showing the original perl version 5.18. I have updated to the latest Perl version 5.26 and even 5.28. They were sitting in the system but not being updated. I saw the .profile and .bashrc thing but unsure what to do with it (again my ignorance).

By the way, is there a safe way to remove all perl and have a complete clean install?

EDIT1: I did a little comparison: I can find the PD folder and PD.pm Image.pm on the working imac, but not on the macbook. Again, I suspected that the GD is not properly installed.

EDIT2: I think that I am getting very close to solve the problem. I just tried "cpanm -f GD" and although failed but I did find the PD folder and the Image.pm via file search. Please note that this may not be the result of "cpanm -f GD" but could be the macports "sudo port install p5.26-gd" command I just used today. The file is located in "/opt/local/lib/perl5/vendor_perl/5.26/darwin-thread-multi-2level/GD/Image.pm." So I ran the perl script. Although the error message is still there, but the error message is "not found: No such file or directory at /Library/Perl/5.18/darwin-thread-multi-2level/GD/Image.pm line 64."

When I typed "perl -v" it shows perl 5.18, not 5.26, which was installed but never activated. So perhaps the final question will be "how to switch from 5.18 perl to 5.26?"

EDIT3: here is the craziest thing that will probably drive all newbies nut, hahaha... I just did another search and the Image.pm and the PD folder do exist inside the "/Library/Perl/5.18/darwin-thread-multi-2level/GD/Image.pm". So what happened in between of all the trials and errors? I read an earlier post about what a pain it is with mac. Now I am kind of stuck. The only other thing is the message whenever I launched the terminal app on my macbook: "-bash /Users/linus/perl5/perlbrew/etc/bashrc: No such file or directory" This was done probably when I was trying to activate the perl 5.28 or 5.26.


In reply to Re^3: Image.pm not found by linus8989
in thread Image.pm not found by linus8989

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.