How to install Perl DBI & DBD modules correctly?

PLEASE HELP!
I'm running OS X Snow Leopard 10.6.3 on a MacBook Pro.
Using MacPorts I've installed the following items:
mysql5 @5.1.45_0 (active)
mysql5-server @5.1.45_0 (active)
p5-dbd-mysql @4.013_0+mysql5 (active)
p5-dbi @1.609_0 (active)
perl5.10 @5.10.1_1+darwin (active)
Everything seems to be working, with the exception ofthe Perl DBI module, and the DBD module. Whenever I try to run a Perl program using DBI, I get the following error:
Sun Apr 18 03:18:42 EDT 2010
~/Perl1 ->
[email protected]<520>$: db.pl
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /Library/Perl/Updates/5.10.0 /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Network/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.10.0 .) at (eval 3) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, SQLite, Sponge.
at /Users/peterv/Perl1/db.pl line 8
Sun Apr 18 03:18:42 EDT 2010
If anyone can also explain what @INC is (I'm assuming it's some kind of path), how to display its value, and how to set it correctly, I'd appreciate that too! I've been working on this for days, so I'd really be grateful for some help!
Thanks,
Peter V.

I've found the problem. I didn't realize that OS X Snow Leopard came with 2 versions of Perl installed, so when I wanted to upgrade to 5.10, I installed it using MacPorts. I also hadn't realized that MacPorts paths had /opt/local prepended to them, so I was running the wrong version of Perl with it. Now I don't get the original error message I posted, but I do get these error messages:
dyld: lazy symbol binding failed: Symbol not found: mysqlinit
Referenced from: /opt/local/lib/perl5/site_perl/5.10.1/darwin-multi-2level/auto/DBD/mysql/mysql. bundle
Expected in: dynamic lookup
dyld: Symbol not found: mysqlinit
Referenced from: /opt/local/lib/perl5/site_perl/5.10.1/darwin-multi-2level/auto/DBD/mysql/mysql. bundle
Expected in: dynamic lookup
Trace/BPT trap
Can someone help me out with these?
Thanks in advance!

Similar Messages

  • Can't install Perl DBI or DBD::mysql after Mountain Lion upgrade

    I recently upgraded to Mountain Lion and found that my Perl DBI scripts stopped working, with the error message "Can't locate DBD/mysql.pm in @INC".
    The last time this happened, after upgrading to Lion, the solution was to install the new version of Xcode. Then I was able to use the Perl CPAN module to install DBI and DBD::mysql. (MySQL is already installed and running with no problem on the Mountain Lion machine.)
    Now I have installed Xcode 4.5.1, and tried
    mrb% sudo perl -MCPAN -e shell
    [then CPAN configures itself]
    cpan[1]> install DBI
    and it fails with this final message:
    /System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/perl.h:583:11: fatal error:
          'sys/types.h' file not found
    #       include <sys/types.h>
                    ^
    1 error generated.
    make: *** [Perl.o] Error 1
      TIMB/DBI-1.622.tar.gz
      /Developer/usr/bin/make -- NOT OK
    'YAML' not installed, will not store persistent state
    Running make test
      Can't test without successful make
    Running make install
      Make had returned bad status, install seems impossible
    Failed during this command:
    TIMB/DBI-1.622.tar.gz                        : make NO
    Can anybody help?

    Here is a link to a resolution in Lion. It may also solve your Mountain Lion Perl DBD issue as well.
    If you run the command below before executing your Perl script the library is found and all is well!
    export DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH"
    Put this in your .bashrc or .bash_profile.
    On Apple StackExchange, Matthew Weiss had another approach.
    I found on another website the following command
    $ sudo perl -MCPAN -e 'CPAN::Shell->notest(install => CPAN::Shell->r)'
    This updated all my perl modules and all is back to normal. Not sure why or what, but don't care that it is working now.

  • How to install perl lib without make?

    Hi, I know that to install perl libs, php, mysql I need install first Developer tool to have a make. But my preview experience was not good. The system become runs slowly, even if I uninstall Developer tool after compiling the sources.
    Now, I reinstall system and found already compiled php, mysql and they works prefect by only 2 more things left, DB and DBI libs for perl and ImageMagick.
    Is it possible to install them without installing Developer tool?
    eMAc   Mac OS X (10.4.9)  

    I've found the problem. I didn't realize that OS X Snow Leopard came with 2 versions of Perl installed, so when I wanted to upgrade to 5.10, I installed it using MacPorts. I also hadn't realized that MacPorts paths had /opt/local prepended to them, so I was running the wrong version of Perl with it. Now I don't get the original error message I posted, but I do get these error messages:
    dyld: lazy symbol binding failed: Symbol not found: mysqlinit
    Referenced from: /opt/local/lib/perl5/site_perl/5.10.1/darwin-multi-2level/auto/DBD/mysql/mysql. bundle
    Expected in: dynamic lookup
    dyld: Symbol not found: mysqlinit
    Referenced from: /opt/local/lib/perl5/site_perl/5.10.1/darwin-multi-2level/auto/DBD/mysql/mysql. bundle
    Expected in: dynamic lookup
    Trace/BPT trap
    Can someone help me out with these?
    Thanks in advance!

  • How to install Spectral Measurements and Modulation Toolkits for multiple versions of Labview

    I installed NI-RFSG, NI-RFSA, the Spectral Measurements Toolkit, and the Modulation Toolkit.  I have both LabVIEW 7.1 and 8.0 installed on my system.  I developed an application in LV 8.0 and now I need to revert it to LV 7.1.  The problem I am having is that add-on toolkits seem to only have been installed for LV 8.0 because there are several missing VIs and controls when I try to open the LV 7.1 version.  I tried re-installing the toolkits, but this is not fixing the problem.  How can I get the installer to install the toolkits for both versions of LabVIEW?
    Thanks for your help,
    Cherie
    Solved!
    Go to Solution.

    Hello Cherie,
    it's a know issue. You can read it in the modulation toolkit readme :
    Two Versions of LabVIEW Installed
    The installer supports installation of the Modulation Toolkit into a single
    version of LabVIEW; installation of the Toolkit into multiple separate
    installations of LabVIEW (for instance LabVIEW 7.0 and LabVIEW 7.1 installed
    on the same PC and in separate directories) is not supported or recommended.
    An unsupported means of doing so though involves manually copying files from
    one LabVIEW installation to another. To do so, you can install the
    Modulation Toolkit to the home directory of one LabVIEW installation, and
    then manually copy the installed files to the other LabVIEW installation.
    The following list includes pertinent directories and files. Copy all files
    from these directories, including any subdirectories, using the equivalent
    relative paths to the LabVIEW home directory for the target.
    <LabVIEW Home>\vi.lib\AddOns\Modulation\*.*
    <LabVIEW Home>\vi.lib\AddOns\NISML\*.*
    <LabVIEW Home>\examples\Modulation\*.*
    <LabVIEW Home>\resource\objmgr\NIMTAttribs.rc
    <LabVIEW Home>\resource\objmgr\NIMTAttribs.rch
    <LabVIEW Home>\help\lvmod.txt
    <LabVIEW Home>\help\lvmod.chm
    <LabVIEW Home>\help\lvdmt.txt
    <LabVIEW Home>\help\lvdmt.chm
    Note that this listing does not include all installed files. Also, copying
    files in this manner is not equivalent to a full installation into the
    alternative version of LabVIEW. Most notably error text unique to the
    Modulation Toolkit will not be updated and the Example Finder listings will
    not show the Modulation Toolkit examples.
    jerome
    "CherieC" <[email protected]> a écrit dans le message de news:
    [email protected]...
    >I installed NI-RFSG, NI-RFSA, the Spectral Measurements Toolkit, and the
    >Modulation Toolkit.&nbsp; I have both LabVIEW 7.1 and 8.0 installed on my
    >system.&nbsp; I developed an application in LV 8.0 and now I need to revert
    >it to LV 7.1.&nbsp; The problem I am having is that add-on toolkits seem to
    >only have been installed for LV 8.0 because there are several missing VIs
    >and controls when I try to open the LV 7.1 version.&nbsp; I tried
    >re-installing the toolkits, but this is not fixing the problem.&nbsp; How
    >can I get the installer to install the toolkits for both versions of
    >LabVIEW?
    > &nbsp;
    > Thanks for your help,
    > Cherie

  • How to install unsupported (obsolete) toolkits/modules in newer LV versions?

    Hello,
    Installers of LV toolkits/modules do not permit installation in newer LV environments. I don't know if that is necessary, but I am quite positive most of them would actually work 100%. If this "feature" cannot be revised, is it possible to obtain a workarround procedure (file/folder specification) for manual installation?
    I am specifically interested in installing the LV 2012 ARM Module in LV 2014. Even if I find time and mashine to install LV2012, than the ARM module, I am not sure I would be able to completely "move/copy" the ARM installation into the corresponding folder structure of the LV 2014.
    So, is there an explicit  manual installation procedure?
    Thanks in advance,

    I have no knowledge of the specific toolbox you are asking about, but the ability to move old toolboxes to new LabVIEW depends (for the most part) on things like hardware or DLL compatibilities.
    If a toolbox is written in 100% LabVIEW, you should be able to use it with no problem. Earlier this year I needed to access a device via telnet. Unfortunately, NI had dropped the telnet VIs from the internet toolkit is 2012. I was able to copy the old telnet VIs to my 2014 installation, and they worked fine.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to install a blue tooth module ?

    Hey all
    Having heaps of trouble seems my mac book pro does not blue tooth capabilities . Ive tried down loading software to no avail. Tells me there is no blue tooth module  installed. Is this something in can install or do i need to buy an external USB bluetooth devise to enable functionality ??
    cheers
    siteline

    You don't install it as it comes already installed on all Mac laptops.

  • How to install php, perl, python, C text editor

    I want to know how to install perl, php, C , Java Text Editors in Mac OSX.
    which editor is better .

    C you installed by installing the XCode package from your installation DVD
    Perl is already installed
    PHP is already installed
    Text Editors are a Religion, as once you have trained your fingers to use a given text editor, you frequently do not want to change, so after that your editor is the only "True" editor :-)
    If you are serious about C programming in a Unix environment, then Vim or emacs.  If you are going to be doing mostly Mac OS X Objective-C, then use the XCode editor.  If this is just a hobby, then a GUI text editor such as one of the previously mentioned editors

  • [solved]How to install flash plugin in Konqueror?

    I just
    pacman -S flashplugin
    successfully, but still my Konqueror can't work with flash.
    How to install the flashplugin in Konqueror correctly?
    Thanks
    jazzi
    PS: my system is 32bits pc
    Last edited by jazzi (2009-06-10 00:41:58)

    Go to Settings/Configure Konqueror/Plugins and use "Scan for Plugins" then.
    Last edited by FallenWizard (2009-06-09 13:13:01)

  • Can't install perl modul DBD::Oracle with XE

    Hello,
    I have installed oracle 10.2.0.1 XE and want now install the perl modul DBD::Oracle.
    After running
    perl Makefile.PL
    I get the message:
    Unable to locate an oracle.mk, proc.mk or other suitable *.mkfile in your Oracle installation. (I looked in
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/lib/oracle.mk /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/demo/oracle.mk /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/demo/demo_rdbms.mk /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/otrace/demo/atmoci.mk /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/precomp/demo/proc/proc.mk /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/precomp/demo/proc/demo_proc.mk /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/proc/lib/proc.mk /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/proc16/lib/proc16.mk)
    And the program is right!!
    I do not have any of this files on my Computer.
    I also looked in the files
    oracle-instantclient-basic-10.2.0.1-1.i386.rpm
    oracle-instantclient-devel-10.2.0.1-1.i386.rpm
    where I also can't find these files.
    Could you please help and tell me, where I can get these files?
    Thank you,
    Marc

    See the thread on Perl with XE in Re: How can I get CPAN  DBD::Oracle to install with XE?
    -- cj

  • Perl DBI module question

    when I use perl DBI module to connect oacle, there is an error of
    "DBI->connect failed: ORA-12224: TNS:no listener (DBD ERROR:
    OCIServerAttach)", how can I do?
    null

    Ok - I am getting closer to resolving this issue. I downloaded MySQL server libraries from Apple, file and instructions are here: http://support.apple.com/kb/HT4006
    After that, I was able to install Perl DBD::MySQL ver 4.013
    Now machine sees it but a different error is thrown:
    "install_driver(mysql) failed: DBD::MySQL object version 4.013 does not match bootstrap parameter 4.005 at /System/Library/Perl/5.10.0/darwin-thread-multi-2level/DynaLoader.pm line 230.
    Compilation failed in require at (eval 3) line 3."
    Now, there is a 4.005 version of DBD::MySQL but it is 3 years old. I am not sure if it is just a coincidence with a "4.005" index being similar to module version number, or this is indeed what system is requiring.
    Any suggestions? Thanks in advance

  • How to install DBD::mysql on Lion?

    After upgrading to Lion, I found that my Perl DBI scripts were no longer able to connect to a MySQL database. They would return an error message like this:
    install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /Library/Perl/5.12/darwin-thread-multi-2level /Library/Perl/5.12 /Network/Library/Perl/5.12/darwin-thread-multi-2level /Network/Library/Perl/5.12 /Library/Perl/Updates/5.12.3 /System/Library/Perl/5.12/darwin-thread-multi-2level /System/Library/Perl/5.12 /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level /System/Library/Perl/Extras/5.12 .) at (eval 3) line 3.
    Perhaps the DBD::mysql perl module hasn't been fully installed,
    or perhaps the capitalisation of 'mysql' isn't right.
    Available drivers: DBM, ExampleP, File, Gofer, Proxy, SQLite, Sponge.
    at ./dbitest.pl line 11
    Searching the Mac for 'mysql.pm' anywhere came up empty, so I assumed that Lion had wiped out my DBD::mysql installation. So I tried to re-install it using CPAN. After finding the necessary files, it ended badly:
    Checking if your kit is complete...
    Looks good
    Using DBI 1.615 (for perl 5.012003 on darwin-thread-multi-2level) installed in /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/auto/DBI/
    Writing Makefile for DBD::mysql
    Can't exec "make": No such file or directory at /System/Library/Perl/5.12/CPAN/Distribution.pm line 2026.
      CAPTTOFU/DBD-mysql-4.020.tar.gz
      make -- NOT OK
    'YAML' not installed, will not store persistent state
    Running make test
      Can't test without successful make
    Running make install
      Make had returned bad status, install seems impossible
    Failed during this command:
    CAPTTOFU/DBD-mysql-4.020.tar.gz              : make NO
    The first problem seems to be "Can't exec 'make'", and when I enter "which make", I get nothing. Wasn't 'make' included with the previous version of OS X? I don't recall installing it myself, and I'm not sure where to begin here.

    Update: I located 'make' in Developer/usr/bin and added that to my path. Now the attempt to install DBD::mysql ends slightly differently:
    Checking if your kit is complete...
    Looks good
    Using DBI 1.615 (for perl 5.012003 on darwin-thread-multi-2level) installed in /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/auto/DBI/
    Writing Makefile for DBD::mysql
    make: *** No rule to make target `/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/config.h', needed by `Makefile'.  Stop.
      CAPTTOFU/DBD-mysql-4.020.tar.gz
      make -- NOT OK
    'YAML' not installed, will not store persistent state
    Running make test
      Can't test without successful make
    Running make install
      Make had returned bad status, install seems impossible
    Failed during this command:
    CAPTTOFU/DBD-mysql-4.020.tar.gz              : make NO
    I don't know what to make of "No rule to make target..."

  • How to install mod_perl in 9iAS and run perl ?

    i am running 9iAS on winnt 4 , i want to install perl module in 9iAS and run oraperl / perl ? any ideas?
    null

    You may want to take a look at WebMin - besides an all-round great way to manage a server, it provides in depth tinkering w/Apache, albeit not so much for the faint-of-heart at times. You'll have loads of control over Apache, but deciding how to wield it can be intimidating until you've gotten settled in.
    In any case, the things that are made easier far outweigh any learning curve on the few that demand more.

  • Uninstall all CPAN-installed Perl modules

    A while back, there was a large perl upgrade which required rebuilding of manually-installed Perl modules. At the time, I did not take much of any action as I did not use any applications which depended on CPAN-installed modules -- all I did was to uninstall some older Perl apps which I no longer used.
    Unfortunately, that has recently changed.
    Though I know exactly which modules I need to have on my system when all is said and done, I have no idea how to uninstall all of the old ones which came from the CPAN shell. Does anyone know how to do so?

    rowdog wrote:
    Well, modules are just files so, if you're lucky, the easy way is to find the directory where the modules were installed and delete them.
    If you're unlucky, you've intermingled CPAN modules with those installed by Arch. If that's the case, you might be able to delete each module by hand but you need to be careful not to wipe out Arch's modules. This is slow and hazardous work so please be careful.
    My guess would be that the files are installed in /usr/lib/perl5/site_perl, because mine's empty and that's what it's for. The exact location is controlled by whatever you used to install the modules. (cpan probably, but there are others.)
    If you're really lucky, you can get away with
    cd /usr/lib/perl5/site_perl
    rm -rf .
    Yes, I do have such bad luck. I have used the CPAN.pm shell, the AUR, and pacman to install Perl modules. I shall do more research regarding exactly what goes where during a CPAN.pm-based install. I am not at my own computer so I cannot do all of this now. I will get back to you on this tomorrow. Thank you for your response.
    Last edited by Bushman (2011-07-31 13:10:00)

  • Perl DBI and DBD

    I know there has been a thread for this but there does not to be an answer to this.
    I have a new mac mini with Snow Leopard which I installed MYSQL 5 64 bit. I am trying to run perl scripts that connect to MYSQL but Perl throws an error regarding the DBD module. I have tried using CPAN to update the modules which seems to be successfull in regards updating but still I get the DBD module error. I have tried installing the modules manually but still I get the same error. Also I tried 32 bit MySQL but still it does not work.
    Has anyone solved this problem at all? I have rolled back my Mac using timemachine to the stock build so I am ready to try this all again!
    Regards
    Chris.
    Message was edited by: BigChrisUK01

    BigChrisUK01 wrote:
    to be honest I am not totally sure what I am doing.
    Unfortunately, you are going to have to find out. You are trying to get 4 very complex systems (MacOS X, MySQL, Perl, and CPAN) all working together. Plus, you have chosen to do so on a brand-new OS.
    If you want people to be able to help you can't just say things like "an error", "does not work", or "a web site". You must be explicit. What error are you getting? Use copy and paste. If you try it a different way, what error is that? What web site were you looking at? Maybe it was from 2002.
    Your first step is to find out just what is installed on your system. Use the command "file" to find out what architecture your mysqlclient libraries are. Also find out about your DBD files.

  • How to install memory modules on a macbook pro 15"

    I run Windows 7 via parallels desktop on my macbook pro. How do I type special characters on a Word document using the mac keyboard?

    how to install memory modules on a macbook pro 15"
    Read the manual / user guide that came with your comptuer or download it from http://support.apple.com/manuals/
    I run Windows 7 via parallels desktop on my macbook pro. How do I type special characters on a Word document using the mac keyboard?
    Post your question on the Paralells forums:  http://forums.parallels.com

Maybe you are looking for