Help installing ODBC driver

Moderator: crythias

Locked
PerXX
Znuny newbie
Posts: 5
Joined: 19 May 2011, 10:18
Znuny Version: 3.0

Help installing ODBC driver

Post by PerXX »

Hey,

I'm fairly new to this, so I'd really appreciate some help here.
I'm trying to set up OTRS on a Linux CentOS system, connecting to a MS SQL server.

I've installed the OTRS, but have problems setting it up to connect to MS SQL server, getting this error message:
Software error:

install_driver(ODBC) failed: Can't locate DBD/ODBC.pm in @INC (@INC contains: /usr/Custom /usr/Kernel/cpan-lib /usr /opt/otrs/Custom /opt/otrs/Kernel/cpan-lib /opt/otrs/ /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 . /etc/httpd) at (eval 192) line 3.
Perhaps the DBD::ODBC perl module hasn't been fully installed,
or perhaps the capitalisation of 'ODBC' isn't right.
Available drivers: DBM, ExampleP, File, Proxy, Sponge, mysql.
at /opt/otrs//Kernel/System/DB.pm line 210

Does anyone have a very explicit guide telling me "do this, then do that" to properly get the ODBC driver installed?
I know this might be a bit much to ask, but I'd really like it if someone could take the time to point me to a step-by-step guide.
I've searched through the FAQ, but it only seems to concentrate on MySQL connections.
PerXX
Znuny newbie
Posts: 5
Joined: 19 May 2011, 10:18
Znuny Version: 3.0

Re: Help installing ODBC driver

Post by PerXX »

No one?
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Help installing ODBC driver

Post by jojo »

you need to install an PERL ODBC Driver (DBD::ODBC) via CPAN or via the package manager of your linux distribution. Please have a look on the PERL Webpages and in the package list of your distro.
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
PerXX
Znuny newbie
Posts: 5
Joined: 19 May 2011, 10:18
Znuny Version: 3.0

Re: Help installing ODBC driver

Post by PerXX »

Right.

I'm using CentOS 5.5

When I try to do a "cpanm DBD::ODBC" it comes up with an error:

Code: Select all

I cannot find driver manager header files. Perhaps you need to install the
unixodbc-dev package or the iodbc-dev package


The DBD::ODBC module needs to link with an ODBC 'Driver Manager'.
(The Driver Manager, in turn, needs one or more database specific ODBC
drivers. The DBD::ODBC module does _not_ include any ODBC drivers!)
I have done a yum "install unixODBC" but cannot find any "unixODBC-dev" package to install.
PerXX
Znuny newbie
Posts: 5
Joined: 19 May 2011, 10:18
Znuny Version: 3.0

Re: Help installing ODBC driver

Post by PerXX »

Okay, I've installed unixODBC-devel and gcc.
Now I'm getting this error:

Code: Select all

Successfully installed DBI-1.616 (upgraded from 1.52)
Building and testing DBD-ODBC-1.29
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
gcc -c -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG=4  -I/usr/include  -I. -I/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables   -DVERSION=\"1.29\" -DXS_VERSION=\"1.29\" -fPIC "-I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE"  -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG=4  -I/usr/include ConvertUTF.c
make: *** No rule to make target `/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/DBI/Driver.xst', needed by `ODBC.xsi'.  Stop.
-> FAIL Installing DBD::ODBC failed. See /root/.cpanm/build.log for details.
1 distribution installed
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Help installing ODBC driver

Post by crythias »

you should be able to yum install perl-DBD-ODBC
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
PerXX
Znuny newbie
Posts: 5
Joined: 19 May 2011, 10:18
Znuny Version: 3.0

Re: Help installing ODBC driver

Post by PerXX »

Yeah, thanks!
I had to install Rpmforge befoure I oculd find that driver though, but now it installed properly.
Need to figure out out to configure it though, as I'm getting this message when trying to access the web interface:

Code: Select all

Backend ERROR: OTRS-CGI-10 Perl: 5.8.8 OS: linux Time: Mon May 23 15:52:23 2011 Message: [unixODBC][Driver Manager]Data source name not found, and no default driver specified (SQL-IM002) Traceback (3562): Module: Kernel::System::DB::new (v1.127) Line: 181 Module: Kernel::System::Web::InterfaceAgent::Run (v1.58.2.1) Line: 140 Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler (unknown version) Line: 46 Module: (eval) (v1.89.2.1) Line: 204 Module: ModPerl::RegistryCooker::run (v1.89.2.1) Line: 204 Module: ModPerl::RegistryCooker::default_handler (v1.89.2.1) Line: 170 Module: ModPerl::Registry::handler (v1.99) Line: 31
Locked