|
dyld: lazy symbol binding failed: Symbol not found: _mysql_init
|
|
03-11-2010, 09:49 PM
Post: #1
|
|||
|
|||
|
dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Greetings,
Just installed MySQL-5.1.44-osx10.6-x86 via the dmg (package). Seemed to work fine. I also installed DBD::mysql, but had to use force to get it to install. When I run the cgi programming script on p.202-3 I get this error: dyld: lazy symbol binding failed: Symbol not found: _mysql_init Referenced from: /Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle Expected in: flat namespace dyld: Symbol not found: _mysql_init Referenced from: /Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle Expected in: flat namespace Trace/BPT trap The mysql package was the 32 bit version, not the 64 bit version. Suggestions? thanks, |
|||
|
03-16-2010, 09:36 AM
Post: #2
|
|||
|
|||
|
RE: dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Hi,
Sorry to hear you're having troubles, but from a quick google it seems like you're not the only one: The general problem seems to be a 32-bit / 64-bit mismatch between MySQL and Perl... Okay, as you're installing the 10.6 package of MySQL i'm guessing you're on Snow Leopard? Does your mac have a 64-bit processor in it (see here for details)? Then, once you have established whether you should be running 32-bit or 64-bit code (match to your processor), completely remove MySQL from your system, install the appropriate one (I'm guessing you'll probably need the 64-bit one), then reinstall DBD::MySQL. Let me know how you get on. ![]() P.S. As a quick aside - try not to install perl modules with the force option unless you are 99 - 100% sure they're working (i.e. you know why the tests are failing). It can cause you more pain than good in the long run as the module may not be working as you expect. |
|||
|
03-16-2010, 05:53 PM
Post: #3
|
|||
|
|||
RE: dyld: lazy symbol binding failed: Symbol not found: _mysql_init
(03-16-2010 09:36 AM)Daz Wrote: Hi, Those are all true. And your instructions for installing DBD::mysql "by hand", using CPAN just to get the source was key. The testuser and testpassword were needed by Makefile.PL. And one more thing: I needed to run make as root ($ sudo make), if not: mkdir blib: Permission denied at /Library/Perl/Updates/5.10.0/ExtUtils/Command.pm line 288 make: *** [blib/lib/DBD/.exists] Error 13 http://bixsolutions.net/forum/images/smi...htbulb.gif Thanks for your help. I'm good to go now. My next challenge is developing a webapp using R. I don't have ghostscript installed, so the bitmap function doesn't work yet. ... today's task. http://bixsolutions.net/forum/images/smilies/smile.gif cheers, Tom K. |
|||
|
04-18-2010, 09:08 AM
Post: #4
|
|||
|
|||
|
RE: dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Daz, would you please help me out? I'm having the same problem. I do have a 64 bit processor. I'm running a MacBook Pro with Snow Leopard 10.6.3. I have MySQL and Perl 5.010 installed (via MacPorts). I'm getting these errors when trying to run a DBI Perl script:
Code: dyld: lazy symbol binding failed: Symbol not found: _mysql_initFrom your reply to the original post, these messages seem to involve mismatching "bit" versions of MySQL & Perl. Can you tell me how I can determine which version (32 or 64 bit) of Perl & MySQL I'm running? I'll really appreciate any help you're willing to provide. (I'm new to this forum, and to debugging these kinds of problems, so I'm hoping to learn from this.) ![]() Thanks in advance! |
|||
|
04-20-2010, 10:40 AM
Post: #5
|
|||
|
|||
RE: dyld: lazy symbol binding failed: Symbol not found: _mysql_init
(04-18-2010 09:08 AM)peterv6 Wrote: Daz, would you please help me out? I'm having the same problem. I do have a 64 bit processor. I'm running a MacBook Pro with Snow Leopard 10.6.3. I have MySQL and Perl 5.010 installed (via MacPorts). I'm getting these errors when trying to run a DBI Perl script: Hi ya, Fingers crossed I can help out! From the description you have of your system it's a 64-bit machine (Core 2 Duo), so Snow Leopard would have installed the 64-bit libraries etc. Okay, a couple of questions to get some background info:
Cheers, Daz |
|||
|
07-08-2010, 12:46 PM
Post: #6
|
|||
|
|||
|
RE: dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Hi
Thought I'd contribute here even though the thread is a bit old - I've just been working through this problem and pulling my hair out! This error seems to come up for quite a few people but there aren't many solutions out there that are clear. The issue arises due to problems between 64bit and 32bit perl and MySQL. However, the reason it isn't obvious to solve (at least for me) was this: I have Snow Leopard which has 32bit perl and 64 bit perl - I was using 64 bit perl. I used 64 bit mysql and compiled the DBI and DBD::mysql modules/driver ok. The error wouldn't go away though. After a lot of trying (copying a clean install of Perl off another machine etc) I found a reason... I had used migration assistant from my old MacBook which was why I suspected my Perl install had been compromised. It turns out there is an environment variable which sets the execution of 32 or 64bit perl ! Even though I was using 64 bit perl, it is forced to run as 32 bit and hence the error. If you upgraded/migrated check your environment variables (type 'set' at the command line) and look for: VERSIONER_PERL_PREFER_32_BIT=yes use the command: export VERSIONER_PERL_PREFER_32_BIT=no and retry your script. If that solves it, add the line above to the end of you shell config file /Users/username/.profile - and logout/back in again Hope it helps someone Lee |
|||
|
09-07-2010, 05:37 PM
Post: #7
|
|||
|
|||
|
RE: dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Using Mac OS X 10.5.3, Perl v5.8.8, MySQL5.0.51a
While trying to execute the second Perl script in page 216, I get the following error message: dyld: lazy symbol binding failed: Symbol not found: _mysql_init Referenced from: /Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle Expected in: dynamic lookup dyld: Symbol not found: _mysql_init Referenced from: /Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle Expected in: dynamic lookup Trace/BPT trap The postings in mysql.com and other sites seem to make reference to others having a similar problem with mysql, but those problems deal with compiling or using the make command. I checked, the mysql server is running and I was able to connect with the username and password in the script, so those were not the problems. Am I supposed to be enabling some flags when starting the mysql server or modifying my script in some way that is not explicitly covered in the book? Am I supposed to run mysql_config in some unusual way? |
|||
|
09-16-2010, 12:39 AM
Post: #8
|
|||
|
|||
|
RE: dyld: lazy symbol binding failed: Symbol not found: _mysql_init
UPDATE: 9/15/2010
I cleared out everything, followed "DAZ's" directions for all installations. It finally came down to this error: [Wed Sep 15 19:27:49 2010] [error] [client ::1] DBI connect('database=test;host=localhost','root',...) failed: Can't connect to local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock' (2) at /Library/WebServer/CGI-Executables/MySQLPerl_test.cgi line 45 That socket and folder did not exist So, I created the '/opt/local/var/run/mysql5' directory, then added a symbolic link to an existing mysql socket: ln -s /var/mysql/mysql.sock /opt/local/var/run/mysql5/mysqld.sock And that did it! The script successfully connected and did what it was supposed to do. Clunky for sure, but the darn thing is working now. HLR --- Now that I've upgraded Perl (5.12), MySQL (5.1.49), DBI, and DBD::mysql, my scripts have broken with the same error. I use Mac OS X 10.5.8 9L30 on a MacBookPro core2duo. If there are any dumps, file prints, or other information that I can contribute, I'm willing to dig in to do it. The disappointing thing is that PHP (5.2.12) did not break, MySQL Workbench (5.2.27) did not break, and I can still use MySQL Browser (1.2.12) and it works fine. I hope we can get this resolved. HLR (09-07-2010 05:37 PM)brclarke Wrote: Using Mac OS X 10.5.3, Perl v5.8.8, MySQL5.0.51a |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)

Search
Member List
Help




