Results 1 to 12 of 12
  1. #1
    Installing Tk on OSX

    Member Since
    Jun 25, 2013
    Posts
    4
    Installing Tk on OSX
    I am having trouble installing Tk. I have followed the instructions using Perlbrew and installed Perl v5.16, Tk-804.027. When I run perl -e "use Tk" I am getting "Can't locate Tk/Event.pm in @INC "

  2. #2
    Installing Tk on OSX
    cptkrf's Avatar
    Member Since
    Dec 08, 2009
    Location
    The same as Sheldon Cooper - East Texas
    Posts
    453
    Specs:
    iMac 2014 i5 5k 32gb 1tb fusion, second TB display, 2014 MBA
    Quote Originally Posted by jsw2013 View Post
    I am having trouble installing Tk. I have followed the instructions using Perlbrew and installed Perl v5.16, Tk-804.027. When I run perl -e "use Tk" I am getting "Can't locate Tk/Event.pm in @INC "
    You updated your .bash_profile, right? I ask because that is close to the error I get when trying to install Tk on the OSX supplied perl.

    As to Tk, I just installed both Perlbrew and Tk on a new laptop without error.

    The command, "which perl" will confirm it.

  3. #3
    Installing Tk on OSX

    Member Since
    Jun 25, 2013
    Posts
    4
    Installing Tk on OSX
    Yes, I did update .bash_profile

    I am getting errors in the make process. I think I have no option but to go to Apple support.

    Thanks for your input.

  4. #4
    Installing Tk on OSX
    cptkrf's Avatar
    Member Since
    Dec 08, 2009
    Location
    The same as Sheldon Cooper - East Texas
    Posts
    453
    Specs:
    iMac 2014 i5 5k 32gb 1tb fusion, second TB display, 2014 MBA
    Do you have either Xcode or (much smaller) GCC-10.x.pkg installed? Otherwise Perlbrew will definitely choke on the make process, since there is otherwise no C compiler available to build anything.

  5. #5
    Installing Tk on OSX

    Member Since
    Jun 25, 2013
    Posts
    4
    Installing Tk on OSX
    Yes, Xcode appears to be installed.

  6. #6
    Installing Tk on OSX
    cptkrf's Avatar
    Member Since
    Dec 08, 2009
    Location
    The same as Sheldon Cooper - East Texas
    Posts
    453
    Specs:
    iMac 2014 i5 5k 32gb 1tb fusion, second TB display, 2014 MBA
    My bad. Sorry, don't know why I didn't remember, but once I got home and on my programming system, I pulled up my notes. I couldn't get Tk-804.027 installed on Mountain Lion, either. Lots of make errors.

    I downloaded Tk-804.030 and that worked. I also have a note that make failed with a different error the first time, but when I issued a "make clean" then started the process again, it completed. Make test, didn't work for some reason I didn't log, but Tk has been working fine with Perlbrew on both a Pro and an Air. (Both with ML)

  7. #7
    Installing Tk on OSX

    Member Since
    Jun 25, 2013
    Posts
    4
    Installing Tk on OSX
    Thank you for your comments. I will try installing Tk-804.030 when I get home, some time next week.

    Appreciate your input.

  8. #8
    Installing Tk on OSX
    cptkrf's Avatar
    Member Since
    Dec 08, 2009
    Location
    The same as Sheldon Cooper - East Texas
    Posts
    453
    Specs:
    iMac 2014 i5 5k 32gb 1tb fusion, second TB display, 2014 MBA
    Here is a better way, if you are on Mountain Lion. Haven't tested it on Mavericks yet. Never could make it work on Lion and previous versions.

    login as root in a terminal session and issue the command...

    cpan -i Tk


    Thats it. It loaded Perl Tk fine on my ML laptop. Just for grins, I tried it again on an old DVD player with Snow Leopard and on a very old Mini with Leopard. Still didn't work.

    If someone tries it on Mavericks and it works (or doesn't), please post.

  9. #9
    Installing Tk on OSX
    cptkrf's Avatar
    Member Since
    Dec 08, 2009
    Location
    The same as Sheldon Cooper - East Texas
    Posts
    453
    Specs:
    iMac 2014 i5 5k 32gb 1tb fusion, second TB display, 2014 MBA
    Doesn't work on Mavericks.

    Using -L/usr/X11R6/lib to find /usr/X11R6/lib/libX11.6.dylib
    Cannot find X include files via /usr/X11R6/include
    Cannot find X include files anywhere.
    No 'Makefile' created'YAML' not installed, will not store persistent state
    SREZIC/Tk-804.032.tar.gz
    /usr/bin/perl Makefile.PL -- NOT OK
    Running make test
    Make had some problems, won't test
    Running make install
    Make had some problems, won't install
    Could not read metadata file. Falling back to other methods to determine prerequisites

  10. #10
    Installing Tk on OSX
    cptkrf's Avatar
    Member Since
    Dec 08, 2009
    Location
    The same as Sheldon Cooper - East Texas
    Posts
    453
    Specs:
    iMac 2014 i5 5k 32gb 1tb fusion, second TB display, 2014 MBA
    It ain't gonna work on Mavericks in native mode apparently - at least not without more work that I want to put in it, and to just get undone on the next update of OSX. And almost assuredly it won't work on Yosemite. The best way is to install PerlBrew and maintain an independent Perl.

    Perlbrew

    Several good reasons.
    Easy to install.
    Tk runs fine.
    The Perl install is in your home folder and does not need root permission for install or update or to add Cpan modules.
    You can have any version of Perl you want.
    If you trash it somehow, just dump the folder and reinstall.
    You can easily switch back and forth between system perl and the perlbrew perl.
    No chance of hosing up OSX with trying to install languages that Apple doesn't care about.

    Bad reasons.
    Your bang line will have to be modified if you publish it.

    You will need to download the XQuartz dmg from sourceforge to get the X11 stuff if needed.

  11. #11
    Installing Tk on OSX
    cptkrf's Avatar
    Member Since
    Dec 08, 2009
    Location
    The same as Sheldon Cooper - East Texas
    Posts
    453
    Specs:
    iMac 2014 i5 5k 32gb 1tb fusion, second TB display, 2014 MBA
    Note to Mavericks users (and I assume Yosemite)...

    Don't use the default tk-804.027 from Cpan.org. It won't compile.

    Use the older search.cpan.org page and select the Latest Release at the upper left.
    Then download tk-804.032.

    Works good and actually runs make test better than a native Debian box.

    Again, use PerlBrew so you don't pollute your OSX perl.

  12. #12
    Installing Tk on OSX
    cptkrf's Avatar
    Member Since
    Dec 08, 2009
    Location
    The same as Sheldon Cooper - East Texas
    Posts
    453
    Specs:
    iMac 2014 i5 5k 32gb 1tb fusion, second TB display, 2014 MBA
    Update:

    The above also applies to Yosemite. Works fine.

    However, the discussion really relates to Perl in the main, not just Tk. As long as you have the latest Xquartz loaded, it appears that anything from Cpan will run. Except for the bang line having to match Perlbrew, it runs the language as well as a native Linux system.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Re Installing OSX need help
    By vodoochild81 in forum Apple Desktops
    Replies: 9
    Last Post: 01-21-2011, 09:44 PM
  2. Installing gcc on Mac OSX without re-installing XCode
    By jigglypuff in forum OS X - Development and Darwin
    Replies: 0
    Last Post: 02-26-2010, 12:16 AM
  3. Re-installing OSX
    By WillPryor in forum OS X - Operating System
    Replies: 3
    Last Post: 10-03-2006, 08:49 AM
  4. Installing OSX on a new HD
    By nysaz in forum Apple Notebooks
    Replies: 16
    Last Post: 09-18-2006, 04:31 PM
  5. Help, Installing OSX
    By Basket_Case_24 in forum OS X - Operating System
    Replies: 8
    Last Post: 05-01-2005, 08:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •