New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Installing Tk on OSX


Post Reply New Thread Subscribe

 
Thread Tools
jsw2013

 
Member Since: Jun 25, 2013
Posts: 4
jsw2013 is on a distinguished road

jsw2013 is offline
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 "
QUOTE Thanks
cptkrf

 
Member Since: Dec 08, 2009
Location: The same as Sheldon Cooper - East Texas
Posts: 388
cptkrf is a jewel in the roughcptkrf is a jewel in the rough
Mac Specs: MacBook Air 2013, MacMini,2013, Intel Core i7, 16gb, 27" Thunderbolt display (Highly recommended!)

cptkrf is offline
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.
QUOTE Thanks
jsw2013

 
Member Since: Jun 25, 2013
Posts: 4
jsw2013 is on a distinguished road

jsw2013 is offline
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.
QUOTE Thanks
cptkrf

 
Member Since: Dec 08, 2009
Location: The same as Sheldon Cooper - East Texas
Posts: 388
cptkrf is a jewel in the roughcptkrf is a jewel in the rough
Mac Specs: MacBook Air 2013, MacMini,2013, Intel Core i7, 16gb, 27" Thunderbolt display (Highly recommended!)

cptkrf is offline
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.
QUOTE Thanks
jsw2013

 
Member Since: Jun 25, 2013
Posts: 4
jsw2013 is on a distinguished road

jsw2013 is offline
Yes, Xcode appears to be installed.
QUOTE Thanks
cptkrf

 
Member Since: Dec 08, 2009
Location: The same as Sheldon Cooper - East Texas
Posts: 388
cptkrf is a jewel in the roughcptkrf is a jewel in the rough
Mac Specs: MacBook Air 2013, MacMini,2013, Intel Core i7, 16gb, 27" Thunderbolt display (Highly recommended!)

cptkrf is offline
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)
QUOTE Thanks
jsw2013

 
Member Since: Jun 25, 2013
Posts: 4
jsw2013 is on a distinguished road

jsw2013 is offline
Thank you for your comments. I will try installing Tk-804.030 when I get home, some time next week.

Appreciate your input.
QUOTE Thanks
cptkrf

 
Member Since: Dec 08, 2009
Location: The same as Sheldon Cooper - East Texas
Posts: 388
cptkrf is a jewel in the roughcptkrf is a jewel in the rough
Mac Specs: MacBook Air 2013, MacMini,2013, Intel Core i7, 16gb, 27" Thunderbolt display (Highly recommended!)

cptkrf is offline
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.
QUOTE Thanks
cptkrf

 
Member Since: Dec 08, 2009
Location: The same as Sheldon Cooper - East Texas
Posts: 388
cptkrf is a jewel in the roughcptkrf is a jewel in the rough
Mac Specs: MacBook Air 2013, MacMini,2013, Intel Core i7, 16gb, 27" Thunderbolt display (Highly recommended!)

cptkrf is offline
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
QUOTE Thanks
cptkrf

 
Member Since: Dec 08, 2009
Location: The same as Sheldon Cooper - East Texas
Posts: 388
cptkrf is a jewel in the roughcptkrf is a jewel in the rough
Mac Specs: MacBook Air 2013, MacMini,2013, Intel Core i7, 16gb, 27" Thunderbolt display (Highly recommended!)

cptkrf is offline
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.
QUOTE Thanks

Post Reply New Thread Subscribe


« Os x 10.9.4 | Why won't my app open on other macs? »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Unable to return to OSx after running bootcamp and installing Vista cmb917 Running Windows (or anything else) on your Mac 5 09-13-2009 11:13 AM
Help, Installing OSX Basket_Case_24 OS X - Operating System 8 05-01-2005 08:06 AM
HELP!! Installing OSX was tough, But NOW I'm hosed Aloel OS X - Operating System 8 04-23-2005 07:13 PM
Errors installing OSX 10.3 David123 OS X - Operating System 6 08-25-2004 01:14 PM
Installing OSX on a G4 500?? dj_alexander OS X - Operating System 3 10-20-2003 02:46 PM

All times are GMT -4. The time now is 08:39 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?