I tried installing OpenCV using Rstudio (R version 3.6.3). I installed both Rtools and CMake and added them to the PATH. I received following error:
-- The CXX compiler identification is unknown
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:106 (enable_language):
The CMAKE_CXX_COMPILER:
c:/Rtools/mingw32/bin/g++.exe
is not a full path to an existing compiler tool.
Please help.
Related
This is the error that shows up when I try to run "pip install PySide" on my Jetson Nano. Can someone please let me know how I can fix this error?
CMake Warning at /usr/share/cmake-3.10/Modules/FindQt4.cmake:620 (message):
/usr/bin/qmake reported QT_INSTALL_LIBS as "/usr/lib/aarch64-linux-gnu" but
QtCore could not be found there. Qt is NOT installed correctly for the
target build environment.
Call Stack (most recent call first):
CMakeLists.txt:9 (find_package)
-- Found PythonLibs: /usr/lib/aarch64-linux-gnu/libpython2.7.so (found suitable version "2.7.17", minimum required is "2.6")
-- Found LibXml2: /usr/lib/aarch64-linux-gnu/libxml2.so (found suitable version "2.9.4", minimum required is "2.6.32")
-- Could NOT find LibXslt (missing: LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR) (Required is at least version "1.1.19")
Qt QTGUI library not found.
Qt QTXML library not found.
Qt QTCORE library not found.
CMake Error at ApiExtractor/CMakeLists.txt:82 (qt4_add_resources):
Unknown CMake command "qt4_add_resources".
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-build-mimaL7/PySide/pyside_build/py2.7-qt4.8.7-64bit-release/shiboken/CMakeFiles/CMakeOutput.log".
error: Error configuring shiboken
PySide does not have official release package for ARM systems. You have to build it yourself. All I can afford is this .whl, but keep in mind that it was built on Ubuntu 20.04 with JetPack 4 and Python 3.6 on board.
I need to install nloptr version 1.2.1 on Windows 10. Here is my code:
library("devtools")
install_version("nloptr", version = "1.2.1", repos = "http://cran.us.r-project.org")
And here is extract of error message:
init_nloptr.c:35:10: fatal error: nlopt.h: No such file or directory
#include "nlopt.h"
^~~~~~~~~
compilation terminated.
Any work around?
In fact, when installing {nloptr} from source on Windows OS, 'NLopt' is required. See the description from its github source:
For this to work on Windows, you need to have Rtools and NLopt installed, and set an environment variable NLOPT_HOME with the location of the NLopt library.
This can be done through RTools. Just open "Rtools Bash" program and execute these lines:
pacman -Sy
pacman -S mingw-w64-{i686,x86_64}-nlopt
Note: pacman -Sy is required only for refreshing Rtools packages for the first time use of "pacman".
For more information, see the official instructions of pacman.
I was trying to install the R gsl wrapper in our university's HPC cluster, with R version 3.1.1 and OS x86_64-redhat-linux-gnu (64-bit). But something weird happened:
R CMD INSTALL '/d1/pyangac/gsl_1.9-10.1.tar.gz'
* installing to library /d1/pyangac/R_libs/ installing *source* package gsl...
** package gsl successfully unpacked and MD5 sums checked
checking for gsl-config... /usr/local/gsl-1.16/bin/gsl-config
checking if GSL version >= 1.12... checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
ERROR: configuration failed for package gsl
* removing /d1/pyangac/R_libs/gsl
Here are some specifics I have made before I run the installation command. There are two gsl libraries already installed in the cluster, one is gsl, and the other is gsl-1.16 (version 1.16). As the R gsl wrapper requires external gsl library version >= 1.12, before installation, I have set the environments LDFLAGS="-L/usr/local/gsl-1.16/lib -lgsl -lgslcblas -lm"; export LDFLAGS and CPPFALGS="-I/usr/local/gsl-1.16/include"; export CPPFLAGS, so that R will install the wrapper based on version 1.16. I also added the following two paths to make sure R will find the gsl-config file export PATH=$PATH:/usr/local/gsl-1.16, and export PATH=$PATH:/usr/local/gsl-1.16/bin.
Then I run the previous installation command and the error suggests that the C compiler cannot work. After some searches I think it may be caused by the fact that the gsl library is not in the gcc include directory. After typing the following commands, I think the problem would be solved:
export CPATH=/usr/local/gsl-1.16/include
Unfortunately, when I reinstall the gsl wrapper, the same 'cannot run C compiled programs' error appears again. Sorry that I can't provide any further information, as I cannot find the config.log file.
Does anyone has any hint why this is happening, or how to find the config.log file?
Thanks.
checking whether the C compiler works... configure: error: cannot run
C compiled programs
# yum install gcc-c++
I.e. the install of gcc-c++ will also install the dependencies that make gcc work. ( The gcc missing parts are { glibc-devel, glibc-headers, linux-headers } → /usr/lib64/[files], /usr/include/[files].h )
I'm trying to install ggplot2 on a collaborator's Mac computer. I get this error:
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
ERROR: configuration failed for package ‘stringi’
It looks like I need to install a C compiler. After searching around, the only thing I see mentioned is gcc. To install this, I need to install XCode from the App store. When I try to install XCode, I get a message saying that Mac OS 10.10 or higher is required. His machine is 10.7.5, so it won't intstall.
Is there any way that I can install gcc?
I am not familiar with Mac (I use Windows and Linux Mint) but have a package that I need to be able to tell people on all platforms how to build. This package relies on openNLP and because of encoding issues with the MacOS X does not install via install.packages("openNLP").
I have had people tell me you can still install using install.packages("openNLP", type="source") but I get the following message:
> install.packages("openNLP", type="source")
trying URL 'http://cran.rstudio.com/src/contrib/openNLP_0.0-8.tar.gz'
Content type 'application/x-gzip' length 807784 bytes (788 Kb)
opened URL
==================================================
downloaded 788 Kb
* installing *source* package ‘openNLP’ ...
/Library/Frameworks/R.framework/Resources/bin/config: line 142: make:
command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 143: make:
command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 219: make:
command not found
Could not determine the Java interpreter.
Maybe run R CMD javareconf?
ERROR: configuration failed for package ‘openNLP’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/openNLP’
The downloaded source packages are in
‘/private/var/folders/YW/YWal638NEwi-tFse3NsBFk+++TM/-Tmp-/RtmpaWdKnC/downloaded_packages’
Warning message:
In install.packages("openNLP", type = "source") :
installation of package ‘openNLP’ had non-zero exit status
So I use Mac''s temrinal to do the suggested R CMD javareconf:
Java interpreter : /usr/bin/java
Java version : 1.6.0_37
Java home path :
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Java compiler : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
Java library path:
JNI linker flags : -framework JavaVM
JNI cpp flags : -I$(JAVA_HOME)/include
Updating Java configuration in /Library/Frameworks/R.framework/Resources
Done.
And try closing out R, re-opening and then install.packages("openNLP", type="source") but the same message occurs. Google has not helped me here and I am very unfamiliar with Mac. I assume it has to do with the type of java installed but know too little about Mac to play aimlessly as this is not my Mac machine.
Please direct me with getting openNLP to install correctly.
I just compiled from source on Mas OSX 10.6.8 with R 2.15.2 with no error. Given the fact that the error message says make cannot be found, it sounds as though that machine is not yet set up to compile from source. Do you understand that XCode is not installed by default and that you need to acquire it from Apple in order to compile "source" packages?