Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Image.pm not found

by linus8989 (Novice)
on Jun 26, 2019 at 07:33 UTC ( [id://11101910]=note: print w/replies, xml ) Need Help??


in reply to Re: Image.pm not found
in thread Image.pm not found

Thank you so much, I will try to install libgd and GD tomorrow. Really appreciated. Again, I am still very ignorant about the Perl.

Replies are listed 'Best First'.
Re^3: Image.pm not found
by linus8989 (Novice) on Jun 26, 2019 at 16:35 UTC

    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.

      (Asker has already found a solution as of writing this.)

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

      It should be possible to remove everything except the system Perl (do not attempt to remove the system Perl on macOS!). In this case, I don't think doing so would have been a bad idea, actually; many of the approaches here may have been interfering (at a minimum, I know that MacPorts and Homebrew advise against being installed simultaneously, and make no effort to "play nice" around each other), or at least not reducing the amount of confusion.

      To clean up all MacPorts Perl(s):

      sudo port uninstall --follow-dependents perl5 perl5.26 perl5.28

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11101910]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-23 23:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found