An error occurred while configuring netcdf - netcdf

I was configuring after installing netcdf to run the wrf model.
However, an error occurred and the execution stopped in the middle.
I've tried a lot of different methods, but it doesn't work out.
gcc and gfortran are all installed.
The downloaded version is netcdf-fortran-4.6.0
configure: netCDF-Fortran 4.6.0
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... no
checking whether to enable maintainer-specific portions of Makefiles... no
configure: checking user options
checking whether make supports the include directive... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/atmos/wrf/netcdf-fortran-4.6.0':
configure: error: C compiler cannot create executables
See `config.log' for more details

Related

configuration failed for package ‘rJava’ when running rize - R

I am trying to use the rize package to create a Dockerfile for ShinyApp. Starting the rize::shiny_dockerize() comand from the App dir. One of the packages which are required is the xlsx (Probably hier it is trying also to install rJava). I get the following error:
trying URL 'https://cran.rstudio.com/src/contrib/xlsxjars_0.6.1.tar.gz'
Content type 'application/x-gzip' length 9477071 bytes (9.0 MB)
==================================================
downloaded 9.0 MB
* installing *source* package ‘rJava’ ...
** package ‘rJava’ successfully unpacked and MD5 sums checked
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... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
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 for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
configure: checking whether gcc supports static inline...
yes
checking whether setjmp.h is POSIX.1 compatible... yes
checking whether sigsetjmp is declared... yes
checking whether siglongjmp is declared... yes
checking Java support in R... present:
interpreter : '/usr/bin/java'
archiver : '/usr/bin/jar'
compiler : '/usr/bin/javac'
header prep.: '/usr/bin/javah'
cpp flags : '-I/usr/lib/jvm/java-8-openjdk-amd64/jre/../include -I/usr/lib/jvm/java-8-openjdk-amd64/jre/../include/linux'
java libs : '-L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server -ljvm'
checking whether Java run-time works... ./configure: line 3766: /usr/bin/java: No such file or directory
no
configure: error: Java interpreter '/usr/bin/java' does not work
ERROR: configuration failed for package ‘rJava’
* removing ‘/usr/local/lib/R/site-library/rJava’
Error in i.p(...) :
(converted from warning) installation of package ‘rJava’ had non-zero exit status
Calls: <Anonymous> ... with_rprofile_user -> with_envvar -> force -> force -> i.p
Execution halted
The command '/bin/sh -c R -e "setwd('/srv/shiny-server/app'); automagic::automagic()"' returned a non-zero code: 1
Error in rize::shiny_dockerize() : object 'view_app' not found
does anyone how I can bring this to work in the rize package?
It looks like you have issues with setting proper location of Java. Note that making R happy with Java might be a little bit of struggle.
Take a look here: http://www.owsiak.org/r-java-11-and-making-sure-you-can-load-rjava/ for a sample. It is macOS based, but still, it should work fine.
Basically, what you want to do is to set your JAVA_HOME such way it points at Java installation. Once it's done, you can run R cmd javareconf like this
> sudo R CMD javareconf \
JAVA_HOME=${JAVA_HOME} \
JAVA=${JAVA_HOME}/bin/java \
JAVAC=${JAVA_HOME}/bin/javac \
JAVAH=${JAVA_HOME}/bin/javah \
JAR=${JAVA_HOME}/bin/jar
Make sure you have gcc installed and that you can compile simple C code.
rJava takes some time to install and is uaully a package which gives me a lot of issues. Here is what has generally worked for me in the past.
Install the JAVA JDK from: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
In the command line run : sudo R CMD javareconf
if rJava library is not installed, (this particular version works for me but you could try installing the latest version)
devtools::install_version("rJava", version = "0.9-9", repos = "http://cran.us.r-project.org")
Restart R and attempt to reload the xlsx package
Caution: A lot of stackoverflow questions on this topic have advised people to alter environment variables. This has not been nessasary for me personally.
sudo R CMD javareconf should take care of this.

udunits2 R install: udunits2.h not found

I'm trying to install udunits2 in R in order to satisfy the dependency for the ggforce package. However, the installer keeps failing on the check for udunits2. I have tried the instructions in this (udunits 2 devel is installed as shown here.)
and this thread, which produces the same result as trying to install.packages('udunits2').
I was able to get it working on my Mint machine by just installing udunits2-dev, however I'm quite new to Fedora, and am not sure what is causing this.
System info:
Fedora 28, R-3.4.4
EDIT
Error output when trying to install using install.packages("udunits2", configure.args = "--with-udunits2-lib=/usr/bin/udunits2"):
* installing *source* package ‘udunits2’ ...
** package ‘udunits2’ successfully unpacked and MD5 sums checked
checking for gcc... gcc -m64
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 -m64 accepts -g... yes
checking for gcc -m64 option to accept ISO C89... none needed
checking for XML_ParserCreate in -lexpat... yes
checking how to run the C preprocessor... gcc -m64 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
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 udunits2.h usability... no
checking udunits2.h presence... no
checking for udunits2.h... no
checking for ut_read_xml in -ludunits2... yes
-----Error: udunits2.h not found-----
If the udunits2 library is installed in a non-standard location,
use --configure-args='--with-udunits2-lib=/usr/local/lib' for example,
or --configure-args='--with-udunits2-include=/usr/include/udunits2'
replacing paths with appropriate values for your installation.
You can alternatively use the UDUNITS2_INCLUDE and UDUNITS2_LIB
environment variables.
If udunits2 is not installed, please install it.
It is required for this package.
On Fedora the header file is installed in /usr/include/udunits2, c.f. this Github issue. Solution provided there:
sudo yum install udunits2-devel
Followed by:
install.packages("udunits2",configure.args='--with-udunits2-include=/usr/include/udunits2/')
Get the source code for udunits2 from the website: ftp://ftp.unidata.ucar.edu/pub/udunits
Download, compile, and install udunits2:
# Download the library
wget ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.2.26.tar.gz
# Decompress the archive
tar xf udunits-2.2.26.tar.gz
# Navigate to the archive
cd ./udunits-2.2.26
# Configure the build for your system
./configure prefix=$HOME/.local
# Use 4 jobs to build quickly
make -j 4
# Install to our prefix
make install
Start a new R session and install the udunits2 R package:
(Make sure to change $HOME to your actual home path)
install.packages(
"udunits2",
configure.args = '--with-udunits2-include=$HOME/.local/include/'
)
Tested on this system:
R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server release 6.5 (Santiago)
As a supercomputer server user without permission of sudo yum, I found installing udunits2-devel quite diffcult. Alternatively, i found spack https://spack.readthedocs.io/en/latest/basic_usage.html
quite useful for installing udunits2&units R packages:
spack install r-udunits2
spack install r-units
Spack will automatically install dependent packages, and i don't have to install udunits2-devel by myself.
Since i installed units R package for ggforce R package, and ggforce can't be installed by spack, i need to load units before entering R and then install ggforce:
$source <(spack module tcl loads r-units)
$source <(spack module tcl loads r-udunits2)
$R
>install.packages("ggforce")
and everything worked well.

build error Qt-SQL-driver-plugin for SQLite-DB with SQLCipher-extension for Qt

Step-by-step guide to build Qt-SQL-driver-plugin for SQLite-DB with SQLCipher-extension
On Step-5 running ./configure I get this error message
Codes#Codes-PC /c/temp/sqlcipher-master
$ ./configure --prefix=$(pwd)/dist --with-crypto-lib=none --disable-tcl CFLAGS=
"-DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -I/c/openssl-win32/include /c/te
mp/sqlcipher-master/libeay32.dll -L/c/temp/sqlcipher-master/ -static-libgcc" LD
FLAGS="-leay32"
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in /c/temp/sqlcipher-master':
configure: error: no acceptable C compiler found in $PATH
Seeconfig.log' for more details

Cabal-install error: /usr/bin/ld cannot find -lHSparsec-3.1.7-ghc7.8.3

I have an old version of cabal-install so I downloaded cabal-install 1.20 and When installing it errors out.
Additional note: ghc 7.8.3
OS: CentOS 6.6
Error:
Building network-2.4.2.3...
.......
......
......
usr/bin/ld: cannot find -lHSparsec-3.1.7-ghc7.8.3
collect2: ld returned 1 exit status
error during cabal-install bootstrap:
building the network package failed.
When I try to run "cabal install network-2.5.0.0",getting following errors
root#gains: cabal install network-2.5.0.0
Resolving dependencies...
Configuring network-2.5.0.0...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
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... configure: error: in `/tmp/network-2.5.0.023068/network-2.5.0.0':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
cabal: Error: some packages failed to install:
network-2.5.0.0 failed during the configure step. The exception was:
ExitFailure 1
Error :
checking whether we are cross compiling... configure: error: in `/tmp/network-2.5.0.023068/network-2.5.0.0':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
So, I run command yum groupinstall "development tools", installed c compiler tools and could compile c programs. Then,
checking whether we are cross compiling... configure: error: in /tmp/network-2.5.0.023068/network-2.5.0.0':
I tried mount -o remount,exec,suid /tmp which solved the error.Its because of execution rights issue on the file system.

Can't get RQuantLib working with brew installed quantlib under osx 10.9.4

I've been trying to install RQuantLib package via
install.packages("RQuantLib")
It keeps giving me the following errors
* installing *source* package ‘RQuantLib’ ...
** package ‘RQuantLib’ successfully unpacked and MD5 sums checked
checking for g++... g++
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 g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for R... yes
checking for quantlib-config... yes
checking for Boost development files... no
configure: error: Boost development files not found
ERROR: configuration failed for package ‘RQuantLib’
* removing ‘/usr/local/Cellar/r/3.1.1/R.framework/Versions/3.1/Resources/library/RQuantLib’
I've already done
brew install boost
brew install quantlib
and I've checked the sym links for both, which should be fine (done unlink/link for both).
SOLUTION :
Used the command below based on edd's answer, worked for me
install.packages("RQuantLib", configure.args="--with-boost-include=/usr/local/include/ --with-boost-lib=/usr/local/lib/")
Try to do it either in a shell based on the *.tar.gz file using these
edd#max:~/git/rquantlib(master)$ ./configure --help|grep boost
--with-boost-include=INCLUDE_PATH
--with-boost-lib=LIB_PATH
edd#max:~/git/rquantlib(master)$
or look at the help for install.packages() where you can pass arguments to configure as well -- I find the first method easier.
In essence, it seems that we need to help configure find your Boost headers (and then probably also the library).

Resources