# CPLEX and R -anyone installing RCPLEX on ubuntu?

 0 1 Dear all, i'm trying to install Rcplex on ubuntu and i'm not getting very far. First i installed cplex with the academic licence yesterday, put the ILOG_LICENSE_FILE int its default directory (/usr/ilog/ilm/access.ilm) successfully compilled and executed all the examples in the /root/ILOG/CPLEX_Studio_AcademicResearch122/cplex/examples/x86-64_sles10_4.1/static_pic directory. So i assume cplex is installed correctly (should i?). then i ran forward to the installing instruction on rcplex's website tried them: CPLEXDIR=/root/ILOG/CPLEX_Studio_AcademicResearch122/cplex CPLEXDIR0=/root/ILOG/CPLEX_Studio_AcademicResearch122/cplex/include/ilcplex SYSTEM=x86-64_sles10_4.1 LIBFORMAT=static_pic COPT = -m64 -fPIC #CFLAGS = $(COPT) -I$(CPLEXINCDIR) CPLEXLIBDIR=$CPLEXDIR/lib/$SYSTEM/$LIBFORMAT #CLNFLAGS = -L$(CPLEXLIBDIR) -lcplex -lm -pthread R CMD INSTALL --configure-args="--with-cplex-include=${CPLEXLIBDIR} --with-cplex-cflags=${COPT} --with-cplex-lib='-L${CPLEXLIBDIR}/static_pic -lcplex -lm -lpthread'" /home/kaveh/Documents/Rcplex_0.3-0.tar.gz and got an error: * installing to library ‘/home/kaveh/R/x86_64-pc-linux-gnu-library/2.12’ * installing *source* package ‘Rcplex’ ... checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... no checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking ilcplex/cplex.h usability... no checking ilcplex/cplex.h presence... no checking for ilcplex/cplex.h... no configure: error: CPLEX header cplex.h not found ERROR: configuration failed for package ‘Rcplex i'm very puzzled because ilcplex/cplex.h exists. asked 17 May '11, 06:27 vak 33●1●4 accept rate: 0% 3 Answers:  4 Without any knowledge of R+CPLEX, it seems to me : --with-cplex-include=${CPLEXLIBDIR} is wrong i.e it should not be the lib directory but the include directory i.e $(CPLEXINCDIR). Anyways I could be wrong. answered 17 May '11, 06:43 Bo Jensen ♦ 5.0k●2●9●19 accept rate: 14% Indeed, i simply copy-pasted the (official) R/CRAN website with the instructions. Using your suggestion solved everything. I wish i could up-vote but i don't have enough reps. You basically ended 3 hours of frustrations. (17 May '11, 07:03) vak  3 Yes, it should clearly be$(CPLEXINCDIR). He also needs to define CPLEXINCDIR correctly, which is missing. answered 17 May '11, 06:49 BjarniMax 864●1●3●12 accept rate: 13% 1 Indeed, i simply copy-pasted the (official) R/CRAN website with the instructions. Using your suggestion solved everything. I wish i could up-vote but i don't have enough reps. You basically ended 3 hours of frustrations. (17 May '11, 07:03) vak You welcome. Any time a make (or automake) error message says that it cannot find some file, its usually a good starting point to check to make sure the include path contains everything it is supposed to. In your case, the CFLAGS define with the usual -I flag is commented out. Instead the include path is set by using the --with-cplex-include argument, accomplishing the same thing. (17 May '11, 08:23) BjarniMax
 1 RCplex is an add-on package to the base install of R. I believe you still need to have R installed on the machine in addtion to the INSTALL requirements. According the the RCplex website it needs to be R version > 2.6.0. answered 17 May '11, 08:58 larrydag 1 ♦ 3.2k●5●13●26 accept rate: 9% This is indeed the case. But in this instance is that the instructions on the package's website seem to have been outdated (pending confirmation from the maintainer). (17 May '11, 13:33) vak Even still it is far easier to add a package via the base install of R than to add it via shell command line using make tools. By the way having R installed on your machine can be rather handy. (17 May '11, 17:05) larrydag 1 ♦
 toggle preview community wiki

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "Title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported

Tags:

×191
×5