How can I auto run ccleaner on Mac OS X?

How to get perl to connect to mysql using DBD:mysql

  • I'm over my head again trying to run a program for a class and you were a great help last time. I'm trying to connect to mysql from Perl and have installed DBD:mysql on my Mac (OS X 10.5.8). I have no idea what I'm doing. Can you help? I get the following error whenever I try to run my perl test script: 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 All instructions posted for the class are for Windows and I am lost. I googled this error but all the answers I found are over-my-head computer speak. I rarely do more than the most basic commands in the terminal, so I have no idea where to even begin to know what might be wrong. Can you help me? Let me know what other information I can provide.

  • Answer:

    I would just install http://www.apachefriends.org/en/xampp-macosx.html, install the developer bundle too, and then install DBD::mysql in it. It's quite possible to get the same error if you mix up which version of Perl you're using, but here's how to http://www.apachefriends.org/f/viewtopic.php?p=138980. There's probably a shorter path to solving the actual problem you have, but that's a fairly simple recipe that doesn't require further knowledge of your machine and what you've done so far.

sunshine37 at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Other answers

Doesn't sound like you have DBD::Mysql installed properly or is installed in the wrong location. Any reason why you can't just use Windows in a VM?

wongcorgi

I would also suggest Virtualbox as a free VM solution. You can get pre-made LAMP images where everything will just work. However, 10.5.8 is pretty old. And I can't find if Virtualbox will run on it as a host OS.

sbutler

If you've only installed DBD:MySql, you might also have to install DBI

rhizome

Perl 5.8.8 is ancient, and so far out of support that it is has become a beast to work with. Throw in the possibility that your MySQL is more recent than your DBD::mysql can support and the possibility that you have a 32bit vs 64bit library mismatch in there and you're set for a world of hurt. Never use the old system Perl unless you have to, Apple and RedHat are notorious for mucking up the system Perl to the point that the answer to all problems that start "I'm using /usr/bin/perl" is "Don't, system Perl is fucked up. Build and use your own Perl." I'd definitely go Monsieur Caution's route of using XAMPP and getting yourself a consistent environment with more recent versions of applications built to work with each other. (But I find it odd that XAMPP's Perl wouldn't already have DBI,DBD::mysql included.) And if you go instead the VM route, for goodness sake don't install Windows. Install Ubuntu or Debian. There's no sane reason to install *Windows* to do *MySQL* and *Perl*. That's just madness plain and simple.

zengargoyle

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.