Re: Clean Install
On 6/17/11 11:58 PM, Sherm Pendley wrote: Don't shoot the messenger! :-) DynaLoader is just doing its job and reporting the problem. DBD::mysql can't load, because it's linked against libmysqlclient.18.dylib, and that .dylib is MIA - that's the problem. Is MySQL installed in the same place it was when you built DBD::mysql? sherm-- Thank you Sherm! Yes, first I was installing mysql, 64-bit, immediately after DBI, and than DBD::mysql, with some dirty tricks (see my first posting). And I have only one mysql installed on my HD ... MIA - I was googeling this abbreviation. Does it mean Miami Dolphins or Miami Airport? Sorry for this question, but some times there are not only native speakers in such kind of mailing list. Should I start over again, install everything for the 40th time? Perhaps I should try with use lib ... ??? pointing to the right libmysqlclient.18.dylib ??? marek
Re: Clean Install
At 10:46 +0200 18/06/2011, Marek Stepanek wrote: MIA - I was googeling this abbreviation. Does it mean Miami Dolphins or Miami Airport? Missing in Action == fatally absent I thought I'd give myself a little useless suffering by installing MySQL (the Mac 64-bit .dmg) and then trying to install DBD::mysql with similar results to yours. I then tried various supposed solutions to no effect. Finally I discovered this suggestion and hey presto! success with both installations: $ cd /usr/local/bin $ sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib $ sudo ./cpan [...] cpan[1] install DBD::mysql [...] Appending installation info to /usr/local/lib/perl5/5.14.0/darwin-2level/perllocal.pod CAPTTOFU/DBD-mysql-4.019.tar.gz /usr/bin/make install -- OK _ $ cd $ sudo cpan [...] cpan[1] install DBD::mysql [...] Appending installation info to /Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/perllocal.pod CAPTTOFU/DBD-mysql-4.019.tar.gz /usr/bin/make install -- OK JD
Re: Clean Install
Ok, Sherm, I did reinstall everything now. % which perl /Users/mstep/perl5/perlbrew/perls/perl-5.14.0/bin/perl mysql-5.5.13-osx10.6-x86_64.dmg and with cpanp DBI and manually DBD::mysql % perl Makefile.PL --testuser=mstep --testpassword=s3kr1t % make % make test with the result: PERL_DL_NONLAZY=1 /Users/mstep/perl5/perlbrew/perls/perl-5.14.0/bin/perl -MExtUtils::Command::MM -e test_harness(0, 'blib/lib', 'blib/arch') t/*.t t/00base.t .. 1/6 # Failed test 'use DBD::mysql;' # at t/00base.t line 21. # Tried to use 'DBD::mysql'. # Error: Can't load '/Users/mstep/.cpanplus/5.14.0/build/DBD-mysql-4.019/blib/arch/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Users/mstep/.cpanplus/5.14.0/build/DBD-mysql-4.019/blib/arch/auto/DBD/mysql/mysql.bundle, 2): Library not loaded: libmysqlclient.18.dylib # Referenced from: /Users/mstep/.cpanplus/5.14.0/build/DBD-mysql-4.019/blib/arch/auto/DBD/mysql/mysql.bundle # Reason: image not found at /Users/mstep/perl5/perlbrew/perls/perl-5.14.0/lib/5.14.0/darwin-2level/DynaLoader.pm line 194. # at (eval 7) line 2 # Compilation failed in require at (eval 7) line 2. # BEGIN failed--compilation aborted at (eval 7) line 2. Bailout called. Further testing stopped: Unable to load DBD::mysql FAILED--Further testing stopped: Unable to load DBD::mysql make: *** [test_dynamic] Error 255 [Marek-Stepaneks-MacBook-Pro:5.14.0/build/DBD-mysql-4.019] mstep% which perl /Users/mstep/perl5/perlbrew/perls/perl-5.14.0/bin/perl the mysql daemon is running ... Here too this mystic error of DynaLoader ... marek
Re: Clean Install
At 12:51 +0200 18/06/2011, Marek Stepanek wrote: ...and with cpanp DBI and manually DBD::mysql % perl Makefile.PL --testuser=mstep --testpassword=s3kr1t ..Library not loaded: libmysqlclient.18.dylib Just create the symbolic link as I have just (not originally) suggested: sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib You will then get: $ cd /usr/lib; ls -al | grep *mysql* lrwxr-xr-x1 root wheel44 18 Jun 11:22 libmysqlclient.18.dylib - /usr/local/mysql/lib/libmysqlclient.18.dylib DBD::mysql and install using CPAN. JD
Re: Clean Install
On 6/18/11 12:42 PM, John Delacour wrote: $ sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib Ahhh, I have had this link on my old laptop already. Thank you John!!! This link made it possible that the manual install succeeded :-) I am wondering, how I managed before. And now I spend a lot of time again ... I forgot the hint of Chas. doing: % ./intro6.pl Which is not working with my #!/usr/bin/perl so I have to do it like that: % perl intro6.pl !! or I have to change like follows: #!/Users/mstep/perl5/perlbrew/perls/perl-5.14.0/bin/perl Thank you all for your great help! marek
Re: Clean Install
At 13:23 +0200 18/06/2011, Marek Stepanek wrote: And now I spend a lot of time again ... I forgot the hint of Chas. doing: % ./intro6.pl Which is not working with my #!/usr/bin/perl so I have to do it like that: % perl intro6.pl !! or I have to change like follows: #!/Users/mstep/perl5/perlbrew/perls/perl-5.14.0/bin/perl Yes, well portablility is a great thing and that's why I install Perl in the default location /usr/local/bin, which is linked to from /usr/bin on most servers. I am sure perlbrew has its uses but I have a poor memory and if I install things in the usual places I can more easily find the answers to my problems. In the home environment I simply use either #!/usr/bin/perl or #!/usr/local/bin/perl depending which perl I want to use. On most remote servers the two are equivalent and I have no control over which Perl they have installed. Thank you all for your great help! Glad it worked. If you want some real fun, try installing PDL :-) JD
Re: Clean Install
On Fri, Jun 17, 2011 at 08:14, Marek Stepanek marekstepa...@yahoo.co.uk wrote: snip #!/usr/bin/perl snip And yes, yes, perlbrew activated the right perl: perl -v This is perl 5, version 14, subversion 0 (v5.14.0) built for darwin-2level snip Take another look at the shebang line. You are asking for the version of perl installed in /usr/bin. This is the system version of perl (which is why you are getting 5.10). Your scripts need to start with one of the following paths: #!/home/USERNAME/perl5/perlbrew/perls/perl-5.14.0/bin/perl or #!/usr/bin/env perl The benefit of the first is that it will always use that version of perl, the downside is the same (e.g. when you upgrade to Perl 5.14.1 it will still use 5.14.0). The benefit of the second is that uses the first perl it finds in your PATH, the downsides are that you have to have your PATH setup correctly (for instance, cron jobs don't tend have proper environments) and you always get the version in the PATH (if you have multiple versions of perl that each are doing different things, this might not be the best solution). A third option is to always use the perl interpreter in the commandline: perl foo.pl The shebang line is not used to find the perl interpreter in that case (but I believe some of the switches still have an effect). This is the solution I tend to use these days. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read.
Re: Clean Install
On Fri, Jun 17, 2011 at 3:36 PM, Chas. Owens chas.ow...@gmail.com wrote: On Fri, Jun 17, 2011 at 08:14, Marek Stepanek marekstepa...@yahoo.co.uk wrote: snip #!/usr/bin/perl snip And yes, yes, perlbrew activated the right perl: perl -v This is perl 5, version 14, subversion 0 (v5.14.0) built for darwin-2level snip Take another look at the shebang line. You are asking for the version of perl installed in /usr/bin. This is the system version of perl (which is why you are getting 5.10). Your scripts need to start with one of the following paths: #!/home/USERNAME/perl5/perlbrew/perls/perl-5.14.0/bin/perl Or: #!/home/USERNAME/perl5/perlbrew/perls/current/bin/perl If you want your script to run with whatever Perl perlbrew has currently selected. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: Clean Install
On 6/17/11 9:36 PM, Chas. Owens wrote: #!/home/USERNAME/perl5/perlbrew/perls/perl-5.14.0/bin/perl or #!/usr/bin/env perl perl foo.pl Thank you Chas. for your insight! You suggested good ideas. Unfortunately I get with all your suggestions the same errors like the following: $ perl intro6.pl install_driver(mysql) failed: Can't load '/Users/mstep/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/darwin-2level/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Users/mstep/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/darwin-2level/auto/DBD/mysql/mysql.bundle, 1): Library not loaded: libmysqlclient.18.dylib Referenced from: /Users/mstep/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/darwin-2level/auto/DBD/mysql/mysql.bundle Reason: image not found at /Users/mstep/perl5/perlbrew/perls/perl-5.14.0/lib/5.14.0/darwin-2level/DynaLoader.pm line 194. at (eval 3) line 3 Compilation failed in require at (eval 3) line 3. Perhaps a required shared library or dll isn't installed where expected at intro6.pl line 12 There is something wrong with the DynaLoader: /Users/mstep/perl5/perlbrew/perls/perl-5.14.0/lib/5.14.0/darwin-2level/DynaLoader.pm A nice weekend to all! marek
Re: Clean Install
At 23:34 +0200 17/06/2011, Marek Stepanek wrote: Compilation failed in require at (eval 3) line 3. Perhaps a required shared library or dll isn't installed where expected at intro6.pl line 12 Probably a silly question, but have you installed MySQL? http://www.mysql.com/downloads/mysql/ I'm afraid I can't advise since I can't stand MySQL and find life much easier with SQLite. JD
Re: Clean Install
On Fri, Jun 17, 2011 at 5:34 PM, Marek Stepanek marekstepa...@yahoo.co.uk wrote: install_driver(mysql) failed: Can't load '/Users/mstep/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/darwin-2level/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Users/mstep/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/darwin-2level/auto/DBD/mysql/mysql.bundle, 1): Library not loaded: libmysqlclient.18.dylib Referenced from: /Users/mstep/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/darwin-2level/auto/DBD/mysql/mysql.bundle Reason: image not found at /Users/mstep/perl5/perlbrew/perls/perl-5.14.0/lib/5.14.0/darwin-2level/DynaLoader.pm line 194. at (eval 3) line 3 Compilation failed in require at (eval 3) line 3. Perhaps a required shared library or dll isn't installed where expected at intro6.pl line 12 There is something wrong with the DynaLoader: Don't shoot the messenger! :-) DynaLoader is just doing its job and reporting the problem. DBD::mysql can't load, because it's linked against libmysqlclient.18.dylib, and that .dylib is MIA - that's the problem. Is MySQL installed in the same place it was when you built DBD::mysql? sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: Clean Install
On 6/17/11 11:58 PM, John Delacour wrote: At 23:34 +0200 17/06/2011, Marek Stepanek wrote: Compilation failed in require at (eval 3) line 3. Perhaps a required shared library or dll isn't installed where expected at intro6.pl line 12 Probably a silly question, but have you installed MySQL? http://www.mysql.com/downloads/mysql/ I'm afraid I can't advise since I can't stand MySQL and find life much easier with SQLite. JD :-) I am meanwhile professional in installing mysql Databases. I am installing since one year now all possible variants of this software, 32-bit, 64-bit. I am trying same time to install DBI module and DBD::mysql over it. DBI is installing always without any problem. But DBD::mysql only with many tricks. And the reason to change my one and a half year laptop, was also these troubles between 32-bit and 64-bit software, and all this Perl mess. Probably you are right: I should learn an other Database. Or should I switch to PHP? mysql daemon is running, when I start my script. The Database webdb is created: $dbh = DBI-connect(DBI:mysql:host=localhost;database=webdb, webdev,webdevpass, and there are four entries in teams ... $sth = $dbh-prepare (SELECT name, wins, losses FROM teams); Thank you! Nice weekend! marek
Re: Clean install
On Fri, 26 Apr 2002, Ward W. Vuillemot wrote: I want to do a complete reinstall of Apache, mod_perl, mod_ssl, openSSL and perl. What files do I need to delete to get rid of all the associated files? Have you considered leaving the defaults alone, and just disabling them while you go put your own stuff in /usr/local? This is roughly how things are usually done on other flavors of Unix, partly because it frees you from the vendor's whim: it would be frustrating to remove all this stuff, only to have Apple reinstall it when the next update comes out, no? Just install these things with /usr/local as the basedir and pretend that you don't even have the Apple supplied versions. -- Chris Devers[EMAIL PROTECTED] Apache / mod_perl / http://homepage.mac.com/chdevers/resume/ More war soon. You know how it is.-- mnftiu.cc