Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: install_driver(ODBC) mac mojave 10.14.2

by Corion (Pope)
on Jan 16, 2019 at 17:19 UTC ( #1228652=note: print w/replies, xml ) Need Help??


in reply to install_driver(ODBC) mac mojave 10.14.2

you may need to install the DBD::ODBC module

So, did you install the DBD::ODBC module?

 Available drivers: DBM, ExampleP, File, Gofer, Proxy, SQLite, Sponge. at testperldb.pl

At least Perl thinks you didn't install the module.

Replies are listed 'Best First'.
Re^2: install_driver(ODBC) mac mojave 10.14.2
by raventheone (Novice) on Jan 21, 2019 at 06:55 UTC

    yes you are absolutely right, the DBD::ODBC module is not installed. If i try to install i get this message:

    cpan1> install DBD::ODBC

    Reading '/Users/xxxx/.cpan/Metadata'

    Database was generated on Mon, 21 Jan 2019 01:54:44 GMT

    Running install for module 'DBD::ODBC'

    Running make for M/MJ/MJEVANS/DBD-ODBC-1.60.tar.gz

    Checksum for /Users/xxxx/.cpan/sources/authors/id/M/MJ/MJEVANS/DBD-ODBC-1.60.tar.gz ok

    Scanning cache /Users/xxxx/.cpan/build for sizes

    ............................................................................DONE

    CPAN.pm: Building M/MJ/MJEVANS/DBD-ODBC-1.60.tar.gz

    **********

    Remember to actually *READ* the README file!

    And re-read it if you have any problems.

    **********

    OSNAME: darwin

    LANG: de_CH.UTF-8

    ODBCHOME:

    LD_LIBRARY_PATH:

    DBROOT:

    WINDIR:

    II_SYSTEM:

    DBD_ODBC_UNICODE:

    Perl: 5.018002

    ExtUtils::MakeMaker: 6.66

    Command line options:

    x! = undef

    u! = undef

    o=s =

    g! = 0

    e! = undef

    w! = undef

    Your LANG environment variable is set to "de_CH.UTF-8"

    This is known to cause problems in some perl installations - even stopping

    this Makefile.PL from running without errors. If you have problems please

    try re-running with LANG unset or with the utf part of LANG removed.

    You are using a Perl configured with threading enabled.

    Please read the warnings in DBI about this.

    You should also be aware that on non-Windows platforms ODBC drivers come

    n two forms, thread-safe and non-thread-safe drivers and you may need

    to make sure you are using the right one.

    Press return to continue...

    Looking for odbc_config in : nowhere

    Looking for odbc_config in (PATH) /Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

    Found odbc_config (via odbc_config) version 2.3.7

    odbc_config reports --prefix=/usr/local/Cellar/unixodbc/2.3.7

    odbc_config reports --include-prefix=/usr/local/Cellar/unixodbc/2.3.7/include

    odbc_config reports --lib-prefix=/usr/local/Cellar/unixodbc/2.3.7/lib

    ODBC INC dir set to /usr/local/Cellar/unixodbc/2.3.7/include via odbc_config

    ODBC LIB dir set to /usr/local/Cellar/unixodbc/2.3.7/lib via odbc_config

    Using ODBCHOME /usr/local/Cellar/unixodbc/2.3.7

    This looks like a unixodbc type of driver manager.

    Looking for odbcinst

    Found odbcinst in /usr/local/Cellar/unixodbc/2.3.7/bin

    odbcinst -j reports:

    unixODBC 2.3.7

    DRIVERS............: /usr/local/etc/odbcinst.ini

    SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini

    FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources

    USER DATA SOURCES..: /var/root/.odbc.ini

    SQLULEN Size.......: 8

    SQLLEN Size........: 8

    SQLSETPOSIROW Size.: 8

    Please note these files as they are where you define your ODBC drivers and data sources.

    Looking for odbc_config to get cflags

    Adding odbc_config --cflags "-DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/local/Cellar/unixodbc/2.3.7/include " to CC line

    Warning: LD_LIBRARY_PATH= doesn't include /usr/local/Cellar/unixodbc/2.3.7/lib

    Checking if your kit is complete...

    Looks good

    Using DBI 1.631 (for perl 5.018002 on darwin-thread-multi-2level) installed in /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/auto/DBI/

    Using DBI 1.631 (for perl 5.018002 on darwin-thread-multi-2level) installed in /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/auto/DBI/

    Writing Makefile for DBD::ODBC

    Writing MYMETA.yml and MYMETA.json

    Warning: not all required environment variables are set.

    Warning: Will not be able to run tests as you have not defined

    all of DBI_DSN, DBI_USER and DBI_PASS environment variables.

    cp Changes blib/lib/DBD/ODBC/Changes.pm

    cp FAQ blib/lib/DBD/ODBC/FAQ.pm

    cp TO_DO blib/lib/DBD/ODBC/TO_DO.pm

    cp ODBC.pm blib/lib/DBD/ODBC.pm

    cc -c -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/local/Cellar/unixodbc/2.3.7/include -I/usr/local/Cellar/unixodbc/2.3.7/include -I. -I/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/auto/DBI -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -Os -DVERSION=\"1.60\" -DXS_VERSION=\"1.60\" -iwithsysroot "/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE" -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/local/Cellar/unixodbc/2.3.7/include -I/usr/local/Cellar/unixodbc/2.3.7/include ConvertUTF.c

    make: *** No rule to make target `/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/auto/DBI/Driver_xst.h', needed by `ODBC.xsi'. Stop.

    MJEVANS/DBD-ODBC-1.60.tar.gz

    /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:

    MJEVANS/DBD-ODBC-1.60.tar.gz : make NO

      There are three relevant parts of this output:

      Remember to actually *READ* the README file! And re-read it if you have any problems.

      Have you done that? Twice?

      Your LANG environment variable is set to "de_CH.UTF-8" This is known to cause problems in some perl installations - even stop +ping this Makefile.PL from running without errors. If you have problems ple +ase try re-running with LANG unset or with the utf part of LANG removed.

      Have you done that? What was the result?

      The easiest steps to do that configuration are (from the CPAN client):

      look DBD::ODBC export LANG=C perl Makefile.PL make make test # if the test was successful make install
      You are using a Perl configured with threading enabled. Please read the warnings in DBI about this. You should also be aware that on non-Windows platforms ODBC drivers co +me in two forms, thread-safe and non-thread-safe drivers and you may need to make sure you are using the right one.

      As the ODBC drivers are supplied by your vendor (Apple), we'll assume that Perl and the ODBC drivers are a matching pair here.

        cpan[3]> install DBD::ODBC DBD::ODBC is up to date (1.60). cpan[1]> look DBD::ODBC Reading '/Users/raventheone/.cpan/Metadata' Database was generated on Mon, 21 Jan 2019 01:54:44 GMT Running look for module 'DBD::ODBC' Trying to open a subshell in the build directory... Checksum for /Users/raventheone/.cpan/sources/authors/id/M/MJ/MJEVANS/ +DBD-ODBC-1.60.tar.gz ok Scanning cache /Users/raventheone/.cpan/build for sizes ...................................................................... +......DONE Working directory is /Users/raventheone/.cpan/build/DBD-ODBC-1.60-8omQ +Ke sh-3.2# perl Makefile.PL Looking for odbc_config in : nowhere Looking for odbc_config in (PATH) /Library/Frameworks/Python.framework +/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin Found odbc_config (via odbc_config) version 2.3.7 odbc_config reports --prefix=/usr/local/Cellar/unixodbc/2.3.7 odbc_config reports --include-prefix=/usr/local/Cellar/unixodbc/2.3. +7/include odbc_config reports --lib-prefix=/usr/local/Cellar/unixodbc/2.3.7/li +b ODBC INC dir set to /usr/local/Cellar/unixodbc/2.3.7/include via odb +c_config ODBC LIB dir set to /usr/local/Cellar/unixodbc/2.3.7/lib via odbc_co +nfig Using ODBCHOME /usr/local/Cellar/unixodbc/2.3.7 This looks like a unixodbc type of driver manager. Looking for odbcinst Found odbcinst in /usr/local/Cellar/unixodbc/2.3.7/bin odbcinst -j reports: unixODBC 2.3.7 DRIVERS............: /usr/local/etc/odbcinst.ini SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources USER DATA SOURCES..: /var/root/.odbc.ini SQLULEN Size.......: 8 SQLLEN Size........: 8 SQLSETPOSIROW Size.: 8 Please note these files as they are where you define your ODBC drivers + and data sources. Looking for odbc_config to get cflags Adding odbc_config --cflags "-DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_T +YPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/local/Cellar/unixo +dbc/2.3.7/include " to CC line Warning: LD_LIBRARY_PATH= doesn't include /usr/local/Cellar/unixodbc/2 +.3.7/lib Checking if your kit is complete... Looks good Multiple copies of Driver.xst found in: /Library/Perl/5.18/darwin-thre +ad-multi-2level/auto/DBI/ /System/Library/Perl/Extras/5.18/darwin-thr +ead-multi-2level/auto/DBI/ at Makefile.PL line 151. Using DBI 1.642 (for perl 5.018002 on darwin-thread-multi-2level) inst +alled in /Library/Perl/5.18/darwin-thread-multi-2level/auto/DBI/ Multiple copies of Driver.xst found in: /Library/Perl/5.18/darwin-thre +ad-multi-2level/auto/DBI/ /System/Library/Perl/Extras/5.18/darwin-thr +ead-multi-2level/auto/DBI/ at Makefile.PL line 1136. Using DBI 1.642 (for perl 5.018002 on darwin-thread-multi-2level) inst +alled in /Library/Perl/5.18/darwin-thread-multi-2level/auto/DBI/ Writing Makefile for DBD::ODBC Writing MYMETA.yml and MYMETA.json Warning: not all required environment variables are set. Warning: Will not be able to run tests as you have not defined all of DBI_DSN, DBI_USER and DBI_PASS environment variables. sh-3.2# make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/01base.t ................... ok t/02simple.t ................. skipped: DBI_DSN is undefined t/03dbatt.t .................. skipped: DBI_DSN is undefined t/05meth.t ................... skipped: DBI_DSN is undefined t/07bind.t ................... skipped: DBI_DSN is undefined t/08bind2.t .................. skipped: DBI_DSN is undefined t/09multi.t .................. skipped: DBI_DSN is undefined t/10handler.t ................ skipped: DBI_DSN is undefined t/12blob.t ................... skipped: DBI_DSN is undefined t/20SqlServer.t .............. skipped: DBI_DSN is undefined t/30Oracle.t ................. skipped: DBI_DSN is undefined t/40UnicodeRoundTrip.t ....... skipped: DBI_DSN is undefined t/41Unicode.t ................ skipped: DBI_DSN is undefined t/45_unicode_varchar.t ....... skipped: DBI_DSN is undefined t/50_odbc_utf8_on.t .......... skipped: DBI_DSN is undefined t/70execute_array_dbi.t ...... skipped: DBI_DSN is undefined t/70execute_array_native.t ... skipped: DBI_DSN is undefined t/80_odbc_diags.t ............ skipped: DBI_DSN is undefined t/82_table_info.t ............ skipped: DBI_DSN is undefined t/87_odbc_lob_read.t ......... skipped: DBI_DSN is undefined t/90_trace_flags.t ........... skipped: DBI_DSN is undefined t/odbc_describe_parameter.t .. skipped: DBI_DSN is undefined t/pod-coverage.t ............. 1/1 # Test::Pod::Coverage 1.04 required + for testing POD coverage t/pod-coverage.t ............. ok t/pod.t ...................... ok t/rt_101579.t ................ skipped: DBI_DSN is undefined t/rt_38977.t ................. skipped: DBI_DSN is undefined t/rt_39841.t ................. skipped: DBI_DSN is undefined t/rt_39897.t ................. skipped: DBI_DSN is undefined t/rt_43384.t ................. skipped: DBI_DSN is undefined t/rt_46597.t ................. skipped: DBI_DSN is undefined t/rt_50852.t ................. skipped: DBI_DSN is undefined t/rt_57957.t ................. skipped: DBI_DSN is undefined t/rt_59621.t ................. skipped: DBI_DSN is undefined t/rt_61370.t ................. skipped: DBI_DSN is undefined t/rt_62033.t ................. skipped: DBI_DSN is undefined t/rt_63550.t ................. skipped: DBI_DSN is undefined t/rt_78838.t ................. skipped: DBI_DSN is undefined t/rt_79190.t ................. skipped: DBI_DSN is undefined t/rt_79397.t ................. skipped: DBI_DSN is undefined t/rt_81911.t ................. skipped: DBI_DSN is undefined t/rt_null_nvarchar.t ......... skipped: DBI_DSN is undefined t/sql_type_cast.t ............ skipped: DBI_DSN is undefined All tests successful. Files=42, Tests=11, 1 wallclock secs ( 0.09 usr 0.07 sys + 0.97 cus +r 0.21 csys = 1.34 CPU) Result: PASS

        how do i properly set the DBI_DSN?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1228652]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2019-11-12 13:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (66 votes). Check out past polls.

    Notices?