LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 07-27-2006, 04:46 PM   #1
PB0711
Member
 
Registered: Aug 2004
Location: London, UK
Distribution: Ubuntu 10.10, ubuntu 11.04, suse 9.2, OSX
Posts: 259

Rep: Reputation: 30
RMySQL: installing problems


Hi, Don't know if this is the right place but...

So I am trying to install RMysql, it's an R package to talk to MySQL. Well, when I try to install it from the source ie
Code:
R CMD INSTALL RMySQL.tar.gz
I get an error telling me that mysql cannot be found and that I should set the flags but I'm a little confused on exactly how to do it.

here is a link to my question submitted to the R forum.
http://www.nabble.com/RMySQL-Suse-10...-t1902434.html
 
Old 07-29-2006, 01:30 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Could you explain what an R package is? Is is the statistical analysis package or does it have something to do with ISDN?

I'm not familiar with the "R CMD INSTALL" command, but it might be looking for the mysql socket rather than the mysql command itself. Or it might be examining the /etc/my.cnf file.

Most likely, the R CMD INSTALL command untars the tarball, runs the configure program and then make && make install.
If that is the case, use the:
--with-mysql-dir=MYSQL_DIR specifies an existing MySQL base dir
--with-mysql-inc=MYSQL_INC specifies an existing MySQL include dir
--with-mysql-lib=MYSQL_LIB specifies an existing MySQL lib dir
options.

From the configure.in file:
Code:
dnl 2. We check for mysql.h and -lmysqlclient in system directories, and if
dnl    found, we use these (provide the user does not explicitly request
dnl    another version, see below).  Notice that the MySQL source distribution
dnl    installs by default to /usr/local/lib/mysql and /usr/local/include/mysql
dnl
dnl 3. Alternatively, if the user specifies explicitly a particular MySQL
dnl    installation we use that version. This can be requested through
dnl         --with-mysql-dir=DIR
dnl         --with-mysql-inc=<include-DIR>
dnl    or   --with-mysql-lib=<library-DIR>
dnl
dnl    (these are equivent to setting and exporting MYSQL_{DIR,INC,LIB})
dnl    In the first case, DIR is assumed to include the lib and include
dnl    subdirectories;  individual locations of these two may be
dnl    specified independently through <include-inc> and <library-dir>,
dnl    respectively.  If we found these, we exit.
dnl
dnl 4. We check for the GNU implementation of getopt_long and set the
dnl    C preprocessor macro HAVE_GETOPT_LONG accordingly.  On windows
dnl    (including MinGW) should be false.
dnl
dnl Global variables: The following variables may be set and exported
dnl prior to running configure:
dnl    PKG_CPPFLAGS, PKG_LIBS, MYSQL_DIR, MYSQL_INC, MYSQL_LIB
You could first enter:
Code:
MYSQL_LIB=/usr/lib/mysql    ( or /usr/lib64/mysql depending on your architecture )
MYSQL_DIR=/usr/bin          ( I think it should be the directory where the mysql* commands are located )
export MYSQL_LIB MYSQL_DIR
And then give your "R CMD INSTALL" command another whirl.

I don't know about MYSQL_INC, That one sounds like it would be from the mysql source.
 
Old 08-03-2006, 02:21 PM   #3
PB0711
Member
 
Registered: Aug 2004
Location: London, UK
Distribution: Ubuntu 10.10, ubuntu 11.04, suse 9.2, OSX
Posts: 259

Original Poster
Rep: Reputation: 30
So an R package is just like a CPAN package for Perl. I guess I should call it a module/library. R being a statiscial programming language.

I tried the
Quote:
You could first enter:
Code:

MYSQL_LIB=/usr/lib/mysql
MYSQL_DIR=/usr/bin
export MYSQL_LIB MYSQL_DIR
However, I'm still getting the same install problem asking me to define the directory.
I am sorry I didn't get back earlier, I was away from the internet.

I don't know or see what I am doing wrong. I'm on a x86 and everything is standard so it should all work!?!?!?
 
Old 08-03-2006, 02:25 PM   #4
PB0711
Member
 
Registered: Aug 2004
Location: London, UK
Distribution: Ubuntu 10.10, ubuntu 11.04, suse 9.2, OSX
Posts: 259

Original Poster
Rep: Reputation: 30
Umm maybe this will help?
Code:
dios:~ # R CMD INSTALL RMySQL_0.5-7.tar.gz
* Installing *source* package 'RMySQL' ...
creating cache ./config.cache
checking how to run the C preprocessor... cc -E
checking for compress in -lz... yes
checking for getopt_long in -lc... yes
checking for mysql_init in -lmysqlclient... no
checking for mysql.h... no
checking for /usr/local/include/mysql/mysql.h... no
checking for /usr/include/mysql/mysql.h... no
checking for /usr/local/mysql/include/mysql/mysql.h... no
checking for /opt/include/mysql/mysql.h... no
checking for /include/mysql/mysql.h... no

Configuration error:
  could not find the MySQL installation include and/or library
  directories.  Manually specify the location of the MySQL
  libraries and the header files and re-run R CMD INSTALL.

INSTRUCTIONS:

1. Define and export the 2 shell variables PKG_CPPFLAGS and
   PKG_LIBS to include the directory for header files (*.h)
   and libraries, for example (using Bourne shell syntax):

      export PKG_CPPFLAGS="-I<MySQL-include-dir>"
      export PKG_LIBS="-L<MySQL-lib-dir> -lmysqlclient"

   Re-run the R INSTALL command:

      R CMD INSTALL RMySQL_<version>.tar.gz

2. Alternatively, you may pass the configure arguments
      --with-mysql-dir=<base-dir> (distribution directory)
   or
      --with-mysql-inc=<base-inc> (where MySQL header files reside)
      --with-mysql-lib=<base-lib> (where MySQL libraries reside)
   in the call to R INSTALL --configure-args='...'

   R CMD INSTALL --configure-args='--with-mysql-dir=DIR' RMySQL_<version>.tar.gz

ERROR: configuration failed for package 'RMySQL'
** Removing '/usr/lib/R/library/RMySQL'
 
Old 07-18-2010, 11:18 AM   #5
PB0711
Member
 
Registered: Aug 2004
Location: London, UK
Distribution: Ubuntu 10.10, ubuntu 11.04, suse 9.2, OSX
Posts: 259

Original Poster
Rep: Reputation: 30
I love comming back to my old threads and seeing what I did wrong. Well if anyone stumbles across this and doesn't know what to do you probably didn't install the mysql dbi library. In ubuntu/debian this would be:

Code:
sudo apt-get install libdbd-mysql libmysqlclient16-dev
In suse just find the libdbd-mysql package in yum or YaST

Last edited by PB0711; 07-18-2010 at 11:20 AM.
 
Old 12-14-2013, 08:29 PM   #6
ytbaum
LQ Newbie
 
Registered: Dec 2013
Posts: 1

Rep: Reputation: Disabled
Update on this-

installing libdbd-mysql and libmysqlclient-dev solved this problem for me.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problems installing custom 2.6.14 kernel (for SATA problems) Ekkume Ubuntu 0 12-29-2005 02:39 PM
Having problems installing can someone please help?? Demented101 Linux - Newbie 3 07-31-2005 11:35 PM
Problems installing amsn (TK compiling problems) JNewton Linux - Software 0 05-24-2004 12:07 PM
Problems installing sogates Mandriva 4 04-30-2004 09:09 AM
problems installing redhat 9; usb problems (I think) nhelseth Linux - Newbie 2 04-27-2004 04:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 11:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration