The installation instructions at http://mxnet.io/get_started/ubuntu_setup.html tell to run the .sh file after cd into an appropriate directory but it throws following error:
avijit#avijit-Inspiron-3521:~/mxnet/setup-utils$ bash install-mxnet-ubuntu-r.sh
MXNet root folder: /home/avijit/mxnet/
Building MXNet core. This can take few minutes...
make: *** No targets specified and no makefile found. Stop.
It seems to have some additional steps prior to it, BUT are ommitted from the installation steps in the link. What's is the issue?
NOTE: I'm following "Quick Installation" at http://mxnet.io/get_started/ubuntu_setup.html#install-mxnet-for-r and NOT building it from source.
Could you try run cp make/config.mk . before you run
cd ~/mxnet/setup-utils
bash install-mxnet-ubuntu-r.sh?
It is because of missing the config.mk in the $MXNET_HOME.
Related
I often use R / RStudio that is located on a remote server. Unfortunately, I do not have root / sudo / administrator access on this server, so any installations need to be done only in ~/.
I know that Rmpfr relies on libmpfr4 and mpfr.h. I have mpfr and gmp installed on my local folder (~/), but it seems R / RStudio only knows to look in /usr. I have tried the following command:
install.packages("Rmpfr", type = "source", configure.args = c("--with-mpfr-include=~/include", "--with-mpfr-lib=~/lib"))
and I got the following error:
In file included from Ops.c:12:0:
Rmpfr_utils.h:22:18: fatal error: mpfr.h: No such file or directory
#include <mpfr.h>
^
compilation terminated.
make: *** [Ops.o] Error 1
ERROR: compilation failed for package ‘Rmpfr’
I confirmed that mpfr.h is in the "~/include" folder and libmpfr.a is in the "~/lib" folder. I also have all of the following in my .bash_profile:
export PATH="~/mpfr-4.1.0/src/:$PATH"
export PATH="~/bin/:$PATH"
export PATH="~/gmp-6.2.1/:$PATH"
I'm pretty far out of my element with the more technical Linux / command line stuff, but I'm trying to learn and use Google / manuals as much as possible. My server runs a redhat distro. For some reason, apt-get doesn't seem to be a valid command on my server, yum requires root access that I don't have, and I can't figure out how to install homebrew for any brew solutions.
Please let me know if I need to provide any more information. Thanks in advance.
I'm unable to install Boom 0.9 on Ubuntu 18.04, Boom 0.8 installs without issue. However, we need 0.9 as a pre-req for CausalImpact.
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
/usr/lib/R/etc/Makeconf:176: recipe for target 'Models/Glm/PosteriorSamplers/fill_poisson_mixture_approximation_table_2.o' failed
make[1]: *** [Models/Glm/PosteriorSamplers/fill_poisson_mixture_approximation_table_2.o] Error 4
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/tmp/RtmpKl6J7B/R.INSTALL90e7ca998b2/Boom/src'
ERROR: compilation failed for package 'Boom'
* removing '/usr/local/lib/R/site-library/Boom'
The downloaded source packages are in
'/tmp/RtmpIk7UFT/downloaded_packages'
Warning message:
In install.packages("Boom") : installation of one or more packages failed,
probably 'Boom'
I've ensured that build-essential is up to date with the most current version available (and tried g++-8 as well).
I think someone else in your org may have already contacted me about this. We are mid-flight debugging.
Boom is a large package and can time out when building. The first thing to check is that you are able to build with multiple cores (i.e. you can pass the -j x flag to make).
As a diagnostic you can try building the package without involving R. Clone https://github.com/steve-the-bayesian/BOOM and build with either bazel (up to date) or make (not too far out of date). If this build succeeds then compare flags passed to the R build vs the native build.
To better understand where R is failing, download the Boom package from CRAN https://cran.r-project.org/src/contrib/Boom_0.9.1.tar.gz and try the following from the command line
R CMD CHECK Boom_0.9.1.tar.gz
This will probably fail, but it will generate a directory called Boom.Rcheck, which contains a file 00install.out containing all the compiler output.
It is suspicious that the build above fails on the poisson_mixture_approximation_table, which is a large file that might be overflowing your stack. Or that might be a coincidence.
Take a look at: https://cran.r-project.org/web/checks/check_results_Boom.html
The check page says 'GNU make' is a undeclared SystemRequirement.
Version: 0.9.1
Check: for GNU extensions in Makefiles
Result: NOTE
GNU make is a SystemRequirements.
Since your installation process also seems to fail at make[1] it might make sense to check if GNU make is installed.
The installation of the Boom package from source (also during the Docker build) can fail for several reasons:
low memory pro core
low stack size
timeout of the build process (possible)
We are currently using the following setup for Docker:
core: 4
memory: 8GB
We can use the following command to set the stack size to 16MB before starting the installation:
Docker:
RUN ulimit -s 16384 \
&& R -e 'install.packages("Boom");'
Linux:
ulimit -s 16384 \
&& R -e 'install.packages("Boom");'
Note: The stack size is an operating system-related configuration and can vary depending on the host operating system used.
Note: The command to install the boom package may be different for your application. We use for example packrat.
Similar issue: link
I have exactly the same problem as the poster here, unfortunately no solution is provided on that link.
I built and installed IPOPT (version 3.12.6) on Windows 7 (64bit) with Cygwin, but I cannot seem to get the R interface to work. All commands (configure, make, make install, make test) were executed without error.
When I try to build the R interface from RStudio, I tried using both the code in the "build" folder as well as the code in the main directory. I get the following errors:
`>install.packages("C:/cygwin64/home/Ipopt-3.12.6/build/Ipopt/contrib/RInterface",
repos=NULL, type="source")
Error:
cygwin64/home/Ipopt-3.12.6/build/Ipopt/contrib/RInterface/DESCRIPTION'
Not using the build directory:
`>install.packages("C:/cygwin64/home/Ipopt-3.12.6/Ipopt/contrib/RInterface", repos=NULL, type="source")
Error:
installing source package 'ipoptr' ...
** libs
*** arch - i386 Warning: running command 'make -f "Makevars.win" -f "C:/Users/~1/DOCUME~1/R/R-33~1.1/etc/i386/Makeconf" -f
"C:/Users/~1/DOCUME~1/R/R-33~1.1/share/make/winshlib.mk"
SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)'
SHLIB="ipoptr.dll" ' had status 127 ERROR: compilation failed for
package 'ipoptr'
* removing 'C:/Users/Documents/R/R-3.3.1/library/ipoptr' Warning in install.packages : running command
'"C:/Users/~1/DOCUME~1/R/R-33~1.1/bin/x64/R" CMD INSTALL -l
"C:\Users\Documents\R\R-3.3.1\library"
"C:/cygwin64/home/Ipopt-3.12.6/Ipopt/contrib/RInterface"' had status 1
Warning in install.packages : installation of package
‘C:/cygwin64/home/Ipopt-3.12.6/Ipopt/contrib/RInterface’ had non-zero
exit status
Does anyone know what I could do to resolve this?
EDIT: After installing RTools and adding it to my PATH I get ipoptr.cpp:22:34: fatal error: IpIpoptApplication.hpp: No such file or directory
#include "IpIpoptApplication.hpp", i.e. it seems that ipoptr.cpp cannot find IpIpoptApplication.hpp (which is in a subdirectory of the build folder) and later on in the error still the same Warning: running command 'make -f "Makevars.win" -f ' had status 2.... Copying this file over to the location of ipoptr.cpp moves the error one file further to another similar file that it cannot find. I suspect it cannot find these files because of something being wrong with my makevars.win file (I suspect that that's the file that should point to the currently missing files). Does anyone have an idea what this could be?
EDIT 2: Might it have to do with the comment here indicating that in some cases LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$IPOPTDIR/build/lib should be set? How do I do this? Should this be done in R or cygwin?
I am running cmd-line R (version 3.3.1) without any problem. Installing any package locally from either CRAN or GitHub (i.e. for the user running the session) is ok.
However, in order to install pagkages globally, I use:
$ sudo su -l -c "/usr/bin/R -e \"install.packages('package-name', repos='https://cran.rstudio.com/')\""
/usr/bin/R: line 8: uname: command not found
Following an R session is started and:
> install.packages('package-name',repos='https://cran.rstudio.com/')
is correctly executed inside the R session.
Package components are correctly downloaded and after the last one has finished downloading, I get the 16 identical instances of:
/usr/lib/R/bin/R: line 8: uname: command not found
/usr/lib/R/bin/R: line 143: exec: sh: not found
followed in the end by
The downloaded source packages are in
‘/tmp/RtmpqL1osU/downloaded_packages’
There were 16 warnings (use warnings() to see them)
>
>
sh: 1: rm: not found
I tried this for devtools, swirl, ..., all packages I want to install for all users on the platform.
Installation from CRAN in a local library, i.e. for a given user, gives no trouble. Can anyone suggest how I should proceed ? Thanks.
Well it seems that /usr/bin is not in your $PATH when you use sudo ($PATH from /etc/sudoers is used by sudo, etc/profile is not loaded.).
One workaround is to use su - and then execute the installation (etc/profile should be loaded). Another solution might be to add /usr/bin to the $PATH in your sudo statement.
I just spent well over an hour trying to troubleshoot this issue so I'm going to cross-post a solution from RStudio that worked for me (This post is easier to find on Google).
I was having unrelated issues with reticulate so I tried to start with a clean-slate. After completely removing RStudio/r-base-core from Ubuntu 18, then reinstalling, I noticed the issue from above:
/usr/lib/R/bin/R: line 8: uname: command not found
/usr/lib/R/bin/R: line 143: exec: sh: not found
The problem
I had a .Renviron file sitting in my home directory from a previous installation. It had GITHUB_PAT, GITHUB_USERNAME and a PATH (to python). Once I removed this I was able to install packages again.
I am having a tough time installing R-packages that are not available in the Anaconda repositories. My attempts so far can be found here How to install R-packages not in the conda repositories?.
Currently, I am trying to build the R-package rafalib for conda by following the instructions from this article under the heading Building a conda R package.
The first part works fine.
conda skeleton cran rafalib
Out:
Tip: install CacheControl to cache the CRAN metadata
Fetching metadata from http://cran.r-project.org/
Writing recipe for rafalib
Done
The build command runs into errors
conda build r-rafalib
Out:
Removing old build environment
Removing old work directory
BUILD START: r-rafalib-1.0.0-r3.2.2_0
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata: ......
Solving package specifications: .
Error: Packages missing in current linux-64 channels:
- r 3.2.2*
- r-rcolorbrewer
I have r 3.2.2-64bit installed via conda and it runs without problems. I also already have r-colorbrewer installed via conda and I can use that package without issues in R. Why am I getting these errors when trying to build a conda package?
I am on Linux (Antergos, an Arch derivative) with kernel 4.4.5-1-ARCH.
UPDATE 2015/04/19
Thanks to this answer, I found out that I could include the dependencies by building them separately in the same directory as the package I want to install. That didn't work for me, but I also read that I can include a channel in the build command with -c, just as when installing. So now I do:
conda build -c r r-rafalib
This gets passed all the dependency problems, but after fetching, extracting and linking packages, it fails. Here is the end of the error message.
Removing old work directory
Source cache directory is: /home/joel/anaconda2/conda-bld/src_cache
Downloading source to cache: rafalib_1.0.0.tar.gz
Downloading http://cran.r-project.org/src/contrib/rafalib_1.0.0.tar.gz
rafalib_1.0.0. 100% |#######################| Time: 0:00:00 4.87 MB/s
Success
Extracting download
Package: r-rafalib-1.0.0-r3.2.2_0
source tree in: /home/joel/anaconda2/conda-bld/work/rafalib
+ mv DESCRIPTION DESCRIPTION.old
+ grep -v '^Priority: ' DESCRIPTION.old
+ /home/joel/anaconda2/envs/_build/bin/R CMD INSTALL --build .
sh: symbol lookup error: sh: undefined symbol: rl_signal_event_hook
Command failed: /bin/bash -x -e /home/joel/drafts/r-rafalib/build.sh
The error sh: symbol lookup error: sh: undefined symbol: rl_signal_event_hook is the same as I encounter when using install.packages() as reported here.
There is some related discussion in this thread. I have tried to get around this error by installing different versions of ncurses, including this patched version, and I have tried to link the readline libraries, as suggested here, but I keep running into the same error. I'm quite lost at this point and any help to solve this would be greatly appreciated.
Although I started out with a different problem, the final solution turned out to be the same as I posted elsewhere How to install R-packages not in the conda repositories?. I am adding it here for completeness.
In the end, I got around the rl_event_hookproblems by following the approach recommended here and symlinking anaconda's libreadline to the system one:
mv ~/anaconda3/lib/libreadline.s.6.2 ~/anaconda3/lib/libreadline.s.6.2.bak
ln -s /usr/lib/libreadline.so.6.3 ~/anaconda3/lib/libreadline.s.6.2
I am still having troubles installing some dependency heavy R-packages due to failure to load shared objects when using install.packages() from withing R. However, simpler packages work fine and I can get most of the dependency heavy packages from anacondas R-repositories.