installing rstan/ubuntu

556 views
Skip to first unread message

Chris Weber

unread,
Jun 17, 2016, 1:43:15 PM6/17/16
to Stan users mailing list
Hello,
I'm encountering problems when I install rstan in rstudio on a linux machine. It doesn't seem to build. After the files download, I encounter the output below. The problem seems to be the C compiler isn't working. I've made sure everything is updated on my machine and am not sure why this isn't working. Is this something someone can help me with, or should I try an ubuntu forum?
Thanks,
Chris




2016-06-17 10:39:37 (874 KB/s) - ‘/tmp/Rtmpq45wHN/downloaded_packages/rstan_2.9.0-3.tar.gz’ saved [1099610/1099610]

* installing *source* package ‘stringi’ ...
** package ‘stringi’ successfully unpacked and MD5 sums checked
checking for local ICUDT_DIR... icu55/data
checking for R_HOME... /usr/lib/R
checking for R... /usr/lib/R/bin/R
checking for R >= 3.1.0... yes
checking for cat... /bin/cat
checking for gcc... clang
checking whether the C compiler works... no
configure: error: in `/tmp/RtmpZdCczA/R.INSTALL552440057dbe/stringi':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package ‘stringi’
* removing ‘/home/acag/R/x86_64-pc-linux-gnu-library/3.2/stringi’
Warning in install.packages :
  installation of package ‘stringi’ had non-zero exit status
* installing *source* package ‘colorspace’ ...
** package ‘colorspace’ successfully unpacked and MD5 sums checked
** libs
clang -I/usr/share/R/include -DNDEBUG      -fpic  -g -O3 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c colorspace.c -o colorspace.o
/bin/bash: clang: command not found
/usr/lib/R/etc/Makeconf:134: recipe for target 'colorspace.o' failed
make: *** [colorspace.o] Error 127
ERROR: compilation failed for package ‘colorspace’
* removing ‘/home/acag/R/x86_64-pc-linux-gnu-library/3.2/colorspace’
Warning in install.packages :
  installation of package ‘colorspace’ had non-zero exit status
* installing *source* package ‘digest’ ...
** package ‘digest’ successfully unpacked and MD5 sums checked
** libs
clang -I/usr/share/R/include -DNDEBUG      -fpic  -g -O3 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c aes.c -o aes.o
/bin/bash: clang: command not found
/usr/lib/R/etc/Makeconf:134: recipe for target 'aes.o' failed
make: *** [aes.o] Error 127
ERROR: compilation failed for package ‘digest’
* removing ‘/home/acag/R/x86_64-pc-linux-gnu-library/3.2/digest’
Warning in install.packages :
  installation of package ‘digest’ had non-zero exit status
* installing *source* package ‘plyr’ ...
** package ‘plyr’ successfully unpacked and MD5 sums checked
** libs
clang++ -arch x86_64 -ftemplate-depth-256 -I/usr/share/R/include -DNDEBUG   -I"/home/acag/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include"   -fpic  -O3 -mtune=native -Wno-unused-variable -Wno-unused-function -c RcppExports.cpp -o RcppExports.o
/bin/bash: clang++: command not found
/usr/lib/R/etc/Makeconf:143: recipe for target 'RcppExports.o' failed
make: *** [RcppExports.o] Error 127
ERROR: compilation failed for package ‘plyr’
* removing ‘/home/acag/R/x86_64-pc-linux-gnu-library/3.2/plyr’
Warning in install.packages :
  installation of package ‘plyr’ had non-zero exit status
ERROR: dependency ‘stringi’ is not available for package ‘stringr’
* removing ‘/home/acag/R/x86_64-pc-linux-gnu-library/3.2/stringr’
Warning in install.packages :
  installation of package ‘stringr’ had non-zero exit status
ERROR: dependency ‘colorspace’ is not available for package ‘munsell’
* removing ‘/home/acag/R/x86_64-pc-linux-gnu-library/3.2/munsell’
Warning in install.packages :
  installation of package ‘munsell’ had non-zero exit status
ERROR: dependencies ‘plyr’, ‘stringr’ are not available for package ‘reshape2’
* removing ‘/home/acag/R/x86_64-pc-linux-gnu-library/3.2/reshape2’
Warning in install.packages :
  installation of package ‘reshape2’ had non-zero exit status
ERROR: dependencies ‘plyr’, ‘munsell’ are not available for package ‘scales’
* removing ‘/home/acag/R/x86_64-pc-linux-gnu-library/3.2/scales’
Warning in install.packages :
  installation of package ‘scales’ had non-zero exit status
ERROR: dependencies ‘digest’, ‘plyr’, ‘reshape2’, ‘scales’ are not available for package ‘ggplot2’
* removing ‘/home/acag/R/x86_64-pc-linux-gnu-library/3.2/ggplot2’
Warning in install.packages :
  installation of package ‘ggplot2’ had non-zero exit status
ERROR: dependency ‘ggplot2’ is not available for package ‘rstan’
* removing ‘/home/acag/R/x86_64-pc-linux-gnu-library/3.2/rstan’
Warning in install.packages :
  installation of package ‘rstan’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/Rtmpq45wHN/downloaded_packages’

Krzysztof Sakrejda

unread,
Jun 17, 2016, 2:27:34 PM6/17/16
to Stan users mailing list
Hey, here's the error message about the stringi package:

checking whether the C compiler works... no
configure: error: in `/tmp/RtmpZdCczA/R.INSTALL552440057dbe/stringi':
configure: error: C compiler cannot create executables

Looks like there are some pre-requisites that haven't been met for building software---this is common on a lot of linux distributions if you haven't installed  build tools.  Can't tell much about your specific installation from your message but that's the general problem. Krzysztof

Ben Goodrich

unread,
Jun 17, 2016, 2:53:48 PM6/17/16
to Stan users mailing list
On Friday, June 17, 2016 at 1:43:15 PM UTC-4, Chris Weber wrote:
/bin/bash: clang++: command not found

sudo apt-get install clang++

Ben
 

Chris Weber

unread,
Jun 17, 2016, 5:31:59 PM6/17/16
to Stan users mailing list
This seems to solve the problem. Thanks so much
Reply all
Reply to author
Forward
0 new messages