Link to home
Start Free TrialLog in
Avatar of vbaabv
vbaabvFlag for United States of America

asked on

update R on Suse linux

I have R version 2.15.0 installed in /usr/local/bin, and this is the default; in other words when I type 'which R' this is the path I get.

I also have installed R into /usr/local/R-3.1.1/.   I want to use this version R not just once but as the default, so that when I type 'which R', I get /usr/local/R-3.1.1

How do I do this ?
Avatar of Seth Simmons
Seth Simmons
Flag of United States of America image

rename /usr/local/bin executable and create a symlink in that same folder pointing to the executable in /usr/local/R-3.1.1
Avatar of vbaabv

ASKER

Hi Seth,

Thank you very much for your answer.
I cd into '/usr/local/bin',
renamed 'R' to 'R-old_10-30-14',
then entered  'ln -s /usr/local/R-3.1.1/bin  R'

But, now when I type 'which R', I get 'no R in ' followed by my PATH.

 I seem to have made the link. When I 'ls -l', in the list is :
lrwxrwxrwx   1 mccormack users      22 2014-10-30 14:42 R -> /usr/local/R-3.1.1/bin


If I 'rm R', then 'ln -s /usr/local/R-3.1.1/bin/R  R'
and then type 'R'
I get '/usr/local/bin/R: line 259: /usr/local/R-3.1.1/bin/exec/R: No such file or directory
/usr/local/bin/R: line 259: exec: /usr/local/R-3.1.1/bin/exec/R: cannot execute: No such file or directory'
where does the 3.1.1 version of R reside?
in that bin folder or bin/exec ?
Avatar of vbaabv

ASKER

There is no bin/exec that I can find. The 3.1.1 version of R is in
 /usr/local/R-3.1.1/bin
your symlink is correct then pointing to bin/R
the errors show bin/R which is good though not sure where the bin/exec/R is coming from as i'm not a developer
what if you ran it directly /usr/local/R-3.1.1/bin/R ?
Avatar of vbaabv

ASKER

I I run directly, '/usr/local/R-3.1.1/bin/R', I get the same exact message:
/usr/local/R-3.1.1/bin/R: line 259: /usr/local/R-3.1.1/bin/exec/R: No such file or directory
/usr/local/R-3.1.1/bin/R: line 259: exec: /usr/local/R-3.1.1/bin/exec/R: cannot execute: No such file or directory
how did you install this version?
Avatar of vbaabv

ASKER

cd into /usr/local/R-3.1.1
'./configure'
then 'make',
but I do get some errors:
make[3]: *** [R.bin] Error 1
make[3]: Leaving directory `/usr/local/R-3.1.1/src/main'
make[2]: *** [R] Error 2
make[2]: Leaving directory `/usr/local/R-3.1.1/src/main'
make[1]: *** [R] Error 1
make[1]: Leaving directory `/usr/local/R-3.1.1/src'
make: *** [R] Error 1
That means you didn't create the R binary.  You may be getting ahead of yourself.  What messages did you get when you ran ./configure?  You may be missing something that's needed for make to compile.
Avatar of vbaabv

ASKER

There is a lot of output when I run ./configure and I have attached in a txt document all of the output resulting from running ./configure.  I could not find anything that sticks out. Mostly 'yes' and when there was a 'no' it did not seem too important.

I have also included a text document of the output of running 'make'.
configure.txt
make.txt
I don't see those errors you posted earlier in your recent make.txt file.  Is it working now?
Avatar of vbaabv

ASKER

No, it is still not working.
When I try to open R directly with '/usr/local/R-3.1.1/bin/R'

I get the following error messages:

/usr/local/R-3.1.1/bin/R: line 259: /usr/local/R-3.1.1/bin/exec/R: No such file or directory
/usr/local/R-3.1.1/bin/R: line 259: exec: /usr/local/R-3.1.1/bin/exec/R: cannot execute: No such file or directory

If I cd into /usr/local/R-3.1.1/bin and type 'R',
I get -bash: R: command not found.

If I type ./R , then I get the same as above:
./R: line 259: /usr/local/R-3.1.1/bin/exec/R: No such file or directory
./R: line 259: exec: /usr/local/R-3.1.1/bin/exec/R: cannot execute: No such file or directory
What do you get when you type the following?

ls -l /usr/local/R-3.1.1/bin/

How about when you try R.bin instead of just R?  It looks like your makefile compiles it to R.bin.
Avatar of vbaabv

ASKER

ls -l /usr/local/R-3.1.1
total 2450
drwxr-xr-x  2 oak users     640 2014-11-03 16:19 bin
-rw-r--r--  1 oak users       0 2010-03-17 10:43 ChangeLog
-rw-r--r--  1 oak users  442472 2014-10-31 15:08 config.log
-rw-r--r--  1 oak users   10183 2014-06-04 18:15 config.site
-rwxr-xr-x  1 oak users  107187 2014-10-31 15:06 config.status
-rwxr-xr-x  1 oak users 1352905 2014-07-02 18:16 configure
-rw-r--r--  1 oak users   90444 2014-06-13 18:15 configure.ac
-rw-r--r--  1 oak users   33546 2014-10-31 14:02 configure.txt
-rw-r--r--  1 oak users   18011 2010-03-17 10:43 COPYING
drwxr-xr-x  4 oak users     664 2014-10-31 15:06 doc
drwxr-xr-x  2 oak users     360 2014-10-31 15:06 etc
drwxr-xr-x  3 oak users     336 2014-10-31 15:07 include
-rw-r--r--  1 oak users    1758 2013-07-17 18:05 INSTALL
drwxr-xr-x  2 oak users     120 2014-10-29 15:34 lib
-rwxr-xr-x  1 root      root   275325 2014-10-31 15:07 libtool
drwxr-xr-x  2 oak users     552 2014-10-31 15:06 m4
-rw-r--r--  1 root      root     3922 2014-10-31 15:06 Makeconf
-rw-r--r--  1 oak users    4156 2013-03-05 18:02 Makeconf.in
-rw-r--r--  1 root      root     7446 2014-10-31 15:06 Makefile
-rw-r--r--  1 oak users    7446 2014-10-31 14:02 Makefile.bak
-rw-r--r--  1 oak users    7204 2011-10-02 18:02 Makefile.fw
-rw-r--r--  1 oak users    7593 2014-05-20 18:15 Makefile.in
-rw-r--r--  1 oak users     142 2014-10-31 15:05 Makefrag.cc
-rw-r--r--  1 oak users      59 2014-10-31 15:05 Makefrag.cc_lo
-rw-r--r--  1 oak users     260 2014-10-31 15:05 Makefrag.cxx
-rw-r--r--  1 oak users      60 2014-10-31 15:05 Makefrag.m
-rw-r--r--  1 oak users   58083 2014-10-31 14:14 make.txt
drwxr-xr-x  2 oak users     208 2014-10-31 15:06 po
-rw-r--r--  1 oak users    4131 2014-07-07 18:15 README
drwxr-xr-x 10 oak users     312 2014-10-31 15:06 share
drwxr-xr-x 12 oak users     344 2014-10-31 15:06 src
-rw-r--r--  1 oak users      46 2014-07-10 03:01 SVN-REVISION
drwxr-xr-x  5 oak users    3416 2014-10-31 15:07 tests
drwxr-xr-x  2 oak users     752 2014-10-31 15:07 tools
-rw-r--r--  1 oak users       6 2014-07-10 03:00 VERSION
-rw-r--r--  1 oak users      14 2014-06-29 18:02 VERSION-NICK

When I try R.bin, then I get either a command not found or No such file or directory.
You've listed the wrong directory.  I had asked for ls -l /usr/local/R-3.1.1/bin/, which is one level in.  You listed ls -l /usr/local/R-3.1.1/.  Your executable should be there.

You also have an INSTALL and a README file.  Have you read them?

You can't run R.bin if it's not in your path.  It might be in /usr/local/R-3.1.1/bin/
R.bin
Avatar of vbaabv

ASKER

Sorry, here is /usr/local/R-3.1.1/bin
ls -l /usr/local/R-3.1.1/bin/
total 416
-rwxr-xr-x 1 oak users   1828 2014-09-16 21:49 BATCH
-rwxr-xr-x 1 oak users    317 2014-09-16 21:49 build
-rwxr-xr-x 1 oak users    317 2014-09-16 21:49 check
-rwxr-xr-x 1 oak users   2156 2014-09-16 21:49 COMPILE
-rwxr-xr-x 1 oak users   9459 2014-09-16 21:49 config
-rwxr-xr-x 1 root      root    3606 2014-10-31 15:07 f77_f2c
-rwxr-xr-x 1 oak users    823 2014-09-16 21:49 INSTALL
-rwxr-xr-x 1 root      root   14566 2014-10-31 15:07 javareconf
-rwxr-xr-x 1 root      root  275325 2014-10-31 15:07 libtool
-rwxr-xr-x 1 oak users   1433 2014-09-16 21:49 LINK
-rwxr-xr-x 1 root      root    3494 2014-10-31 15:07 mkinstalldirs
-rwxr-xr-x 1 root      root     481 2014-10-31 15:07 pager
-rwxr-xr-x 1 root      root    8642 2014-10-31 15:07 R
-rwxr-xr-x 1 root      root    1373 2014-10-31 15:07 Rcmd
-rwxr-xr-x 1 oak users    312 2014-09-16 21:49 Rd2pdf
-rwxr-xr-x 1 oak users    359 2014-09-16 21:49 Rdconv
-rwxr-xr-x 1 oak users    258 2014-09-16 21:49 Rdiff
-rwxr-xr-x 1 oak users    158 2014-09-16 21:49 REMOVE
-rwxr-xr-x 1 oak users    310 2014-09-16 21:49 Rprof
-rwxr-xr-x 1 root      root   21291 2014-10-31 15:08 Rscript
-rwxr-xr-x 1 root      root    4121 2014-10-31 15:07 rtags
-rwxr-xr-x 1 oak users    155 2014-09-16 21:49 SHLIB
-rwxr-xr-x 1 oak users    318 2014-09-16 21:49 Stangle
-rwxr-xr-x 1 oak users    316 2014-09-16 21:49 Sweave

  I have read the INSTALL which says a simple compilation by ./configure then make, and that is what I have done.
Does the following run?  I see R in the Folder.

/usr/local/R-3.1.1/bin/R

If it does, then put a link to R in /usr/local/bin

ln /usr/local/R-3.1.1/bin/R /usr/local/bin/R

or if you prefer a symbolic link,
ln -s /usr/local/R-3.1.1/bin/R /usr/local/bin/R
Avatar of vbaabv

ASKER

/usr/local/R-3.1.1/bin/R

/usr/local/R-3.1.1/bin/R: line 259: /usr/local/R-3.1.1/bin/exec/R: No such file or directory
/usr/local/R-3.1.1/bin/R: line 259: exec: /usr/local/R-3.1.1/bin/exec/R: cannot execute: No such file or directory

On the Internet I found a similar problem in which the solution was supposed to be '...a problem with a BLAS installation chosen by ./configure', but I have no idea of what BLAS is.
The problem was:
 "I have just installed R-2.0.1 from R-2.0.1.tar.gz on SUSe 9.1 64bit. When
 I am trying to launch R: R_HOME_DIR/bin/R; I am getting following message:
./R: line 151: /R_HOME_DIR/bin/exec/R: No such file or directory
./R: line 151: exec: /R_HOME_DIR/bin/exec/R: cannot execute: No such file"

I am on SUSE enteprise, SLSE.
It seems that the configure is doing the wrong thing and getting make to compile the wrong path into your binary.

It might be easier to follow the other instructions to install R.  Add the repo and use zypper to install it.

http://cran.r-project.org/bin/linux/suse/README.html
you're running 9.1?  that version is over 10 years old and was discontinued 8 years ago
there could be libraries that are not compatible because they are so old
I didn't catch that on my first pass.  SUSE 14 is the latest.
Avatar of vbaabv

ASKER

Sorry, my fault. I was not clear on my last post. The SUSE 9.1 was taken from an old thread I found with a google search. The person's problem seems very similar to mine and they were using SuSE. The error message they received seems pretty similar to the error message I am receiving, so I posted part of the question and answer as a possible clue to what might be my problem. The answer that person using SUSE 9.1 (it was an old post ) received had to do with BLAS. There were no more posts on the thread, so I thought the answer might have solved the problem, and may be helpful in solving my problem because I am using SLES. I will have to check the version I am using. It is probably abut 4 years old. However, I do not have a clue as to what BLAS is, so I have no idea if it would help me.
To find your SUSE version:

 cat /etc/SuSE-release
Avatar of vbaabv

ASKER

Hi Seth and serialband,
Thanks again for your continued help.

Here is my SUSE version:
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1

Thanks for the link to BLAS on SuSE. I will read it over and see if I can figure anything as to why it would now be a problem.
Easiest way is to re-package opensuse source RPMs of R
rpmbuild -ba SPECS/R.spec
Avatar of vbaabv

ASKER

Thank you very much for your comment gheist. Unfortunately, your knowledge of this is way above mine and I don't quite understand.

To my limited understanding, it seems I should enter the command 'rpmbuild -ba SPECS/R.spec'.  What directory should I be in when I do this ?
You need to download source RPM with zypper source-download on normal openSUSE
Then build that source RPM into installable RPM on your SLES.
(zypper in fakeroot rpmbuild rpm2cpio)
Than just install resulting RPM.
If you upgrade to SUSE 11.3, you should be able to install it with yast2 or zypper.
zypper in R

Otherwise, go get the 1-Click Install from http://cran.r-project.org/bin/linux/suse/
You can get R for SUSE 11.1
http://software.opensuse.org/ymp/devel:languages:R:patched/openSUSE_11.1/R-patched.ymp
or the developer version for SUSE 11.1
http://software.opensuse.org/ymp/devel:languages:R:patched/openSUSE_11.1/R-patched-devel.ymp
Avatar of vbaabv

ASKER

So, once I get the .ymp file. How do I use that ?
Avatar of vbaabv

ASKER

We do hope to actually change from SLSE to CentOS or some other Linux distro, but that will be a big job because we have 14 TB of data that will have to be moved before that can be done and it will probably be a while before it can be done.

  I just have a CLI to the server which is where I am trying to install the new version of R, so I am not using a desktop type environment where I can click on something. Can I still use the .ymp file ?
It's supposedly a One-Click install.  Use a browser in Suse and click on those links.

https://en.opensuse.org/openSUSE:One_Click_Install_UserFAQ
https://en.opensuse.org/openSUSE:One_Click_Install
He uses Suse Linux, not openSUSE
Dear Asker: please follow ymp links for your version of SuSE, not install openSUSE packages ever.
ymp is text file, if you read it you can construct zypper repo entries from the content.
14TB could be shared via NFS to multiple machines, those can be centos, ubuntu, opensuse, gentoo or anything easily reproducable...
Avatar of vbaabv

ASKER

Sorry for the delay in getting back to everyone.

Finding an R .ymp file for openSUSE is easy enough, but I can not seem to find a .ymp R file for SLES.

 Our server administrator seemed to think that the problem was that I needed to specify to the R config file as to where readline 6 lib was located because it needs readline 6 for rl_sort_completion_matches and the config file was probably trying to use our systems base readline 5.2 instead. This is because part of the error command is:
   -lreadline -lrt -ldl -lm
../unix/sys-std.o: In function `initialize_rlcompletion':
/usr/local/R-3.1.2/src/unix/sys-std.c:689: undefined reference to
`rl_sort_completion_matches'
collect2: ld returned 1 exit status
make[3]: *** [R.bin] Error 1
make[3]: Leaving directory `/usr/local/R-3.1.2/src/main'
make[2]: *** [R] Error 2
make[2]: Leaving directory `/usr/local/R-3.1.2/src/main'
make[1]: *** [R] Error 1
make[1]: Leaving directory `/usr/local/R-3.1.2/src'
make: *** [R] Error 1

He didn't go beyond that in terms of instruction or explanation. After searching through the R config file and make file, I could not find anywhere that I could change a path where it looks for readline.

Beginning to think that this is an unsolvable problem.
This page you saw before:
http://cran.r-project.org/bin/linux/suse/
It has links for R for *ALL* suse and opensuse versions.
Avatar of vbaabv

ASKER

Thanks. I saw the OpenSuse written everywhere, I did not realize the SLE was for SLES.

So, I downloaded R-patched-devel.ymp for SLE 11 SP1. Transferred it to our server in the /user/local folder, changed permissions to 755 and then typed:
./R-patched-devel.ymp

Which returned the following:
./R-patched-devel.ymp: line 1: syntax error near unexpected token `newline'
./R-patched-devel.ymp: line 1: `<metapackage xmlns:os="http://opensuse.org/Standards/One_Click_Install" xmlns="http://opensuse.org/Standards/One_Click_Install">'
There's several SUSE 11 links on that page that I first linked that gheist relinked.  Click on the version that matches your SUSE version.  Use a browser from your SUSE system.

Otherwise, scroll down and follow the instructions to add it to your repo, then run zypper.


Installing using the command line

As superuser do

VERSION=$(grep VERSION /etc/SuSE-release | sed -e 's/VERSION = //')
zypper addrepo -f \
http://download.opensuse.org/repositories/devel\:languages\:R\:patched/openSUSE_$VERSION/ \
R-patched

which automatically determines your installed version of openSUSE. After that

zypper install R-patched R-patched-devel

will install R and all dependencies. This only works for supported versions of openSUSE.
Avatar of vbaabv

ASKER

When I try to install with zypper, I get the following:

 sudo zypper install R-patched-devel
Error building the cache:
[|] Repository type can't be determined.
Warning: Disabling repository 'dell-omsa-hw' because of the above error.
Loading repository data...
Reading installed packages...
'R-patched-devel' not found.
Resolving package dependencies...

Nothing to do.
You have problems with dell repositories.
Please fix them before installing anything else.
At least make sure 'zypper ref' exits cleanly before adding extra repositories.
Avatar of vbaabv

ASKER

I have removed dell-omsa-hw.repo from /etc/zypp/repos.d/.

Now when I type:
sudo VERSION=$(grep VERSION /etc/SuSE-release | sed -e 's/VERSION = //') zypper addrepo -f http://download.opensuse.org/repositories/devel\:languages\:R\:patched/openSUSE_$VERSION
/R-patched

Open in new window


I get: If only one argument is used, it must be a URI pointing to a .repo file.
addrepo (ar) [options] <URI> <alias>
addrepo (ar) [options] <file.repo>

Add a repository to the sytem. The repository can be specified by its URI or can be read from specified .repo file (even remote). (with a list of Command options.)
Avatar of vbaabv

ASKER

This did work:
sudo VERSION=$(grep VERSION /etc/SuSE-release | sed -e 's/VERSION = //') zypper addrepo -f http://download.opensuse.org/repositories/devel:/languages:/R:/base/SLE_11_SP1/devel:languages:R:base.repo

Open in new window


Adding repository 'R-base (SLE_11_SP1)' [done]
Repository 'R-base (SLE_11_SP1)' successfully added
Enabled: Yes
Autorefresh: Yes
URI: http://download.opensuse.org/repositories/devel:/languages:/R:/base/SLE_11_SP1/
Avatar of vbaabv

ASKER

However, there were problems with installing R-base:

sudo zypper install R-base
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW packages are going to be installed:
  R-base R-base-devel xdg-utils

The following packages are not supported by their vendor:
  R-base R-base-devel

3 new packages to install.
Overall download size: 46.3 MiB. After the operation, additional 67.0 MiB will be used.
Continue? [y/n/?] (y): y
Retrieving package xdg-utils-1.0.2-36.18.noarch (1/3), 49.0 KiB (183.0 KiB unpacked)
Failed to mount cd:///?devices=/dev/sr0 on /var/adm/mount/AP_0x00000005: Mounting media failed (mount: no medium found on /dev/sr0)

Please insert medium [SUSE-Linux-Enterprise-Server-11-SP1 11.1.1-1.152] #1 and type 'y' to continue or 'n' to cancel the operation. [yes/no] (no):
you might wish to install libR* and R-devel too...
Avatar of vbaabv

ASKER

When installing libR*, I get a screen message that I can not do because I do not have the SUSE cd.

Please insert medium [SUSE-Linux-Enterprise-Server-11-SP1 11.1.1-1.152] #1 and type 'y' to continue or 'n' to cancel the operation. [yes/no] (no): n
Failed to provide Package termcap-2.0.8-981.18. Do you want to retry retrieval?
You need to rename that repo too and use online ubscription
I think it is in yast / Software/ Configure repositories and Configure subscription.
Avatar of vbaabv

ASKER

I tried 'whereis YaST' and found two locations: /sbin/YaST and /lib/YaST, but there is no Software or Configure repositories and/ Configure subscription.

I found a SuSEconfig.functions file in /lib/YaST, but its 100 lines and I do not see anything familiar in it.

If I try 'whereis termcap-2.0.8-981.18', I just get 'termcap-2.0.8-981.18:  '.

I appreciate all the help, but I think the only solution is going to be to re-install a new OS,
you can run commad "sudo yast"
Avatar of vbaabv

ASKER

The 'sudo yast' command, when entered on this machine anyway, results in :
 
'sudo: yast: command not found'
It is not about R, simply your package manager is in bad disorder.
Can you run a yast or YaST  when logged in as root and FIX SOFTWARE REPOSITORIES?
Avatar of vbaabv

ASKER

Can I fix the software repos without having to use the command 'yast'. I always get the 'sudo: yast: command not found'.
ASKER CERTIFIED SOLUTION
Avatar of gheist
gheist
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vbaabv

ASKER

Wow !  I did't know there was anything like this on the server. But, I am having some difficulty moving around. There are commands in brackets. How do I use them; with the mouse, typing ?
TAB is auto-complete character. I wrote it as [tab]
For software completeness get hold of OpenSUSE 13.1 , later adding evergreen it will last for another 3 years and run R 3.1.2. Also 13.x series do not stick with CD as repository.
Avatar of vbaabv

ASKER

After sudo -s  and then Yast, how do I get out of this to back to the regular > prompt ?
How did you register system first time?
Press Alt and the highlighted key
You cannot add new SLES 10 systems after      31 Jul 2013
Or SLES9U1       19 Jan 2005

Please acquire reasonably fresh system as ones you mentioned are between year and 10 EOL.
Avatar of vbaabv

ASKER

Thanks for your patience.