Unable to install RJDBC package on RedHat - rjava

An open source R package I am planning to use uses RJDBC. When I tried to install RJDBC using
install.packages("RJDBC")
I get an error indicating that rJava is not installed. Tried installing rJava using
install.packages("rJava")
But that resulted in error
checking whether JNI programs can be compiled... configure: error: Cannot compile a simple JNI program. See config.log for details.
Make sure you have Java Development Kit installed and correctly registered in R.
If in doubt, re-run "R CMD javareconf" as root.
ERROR: configuration failed for package ‘rJava’
* removing ‘/home/john/R/x86_64-pc-linux-gnu-library/3.5/rJava’
Warning in install.packages :
installation of package ‘rJava’ had non-zero exit status
The downloaded source packages are in
‘/store/tmp/Rtmp0teUWN/downloaded_packages’
Found this SO question and tired almost all the suggestions without luck.
Logged in as root on the server using sudo su
Ran
R CMD javareconf
echo JAVA_HOME printed empty. So used the value from output of R CMD javareconf
ran R CMD javareconf -ed
then from R console ran
install.packages("rJava")
This seems to have installed the package and I assumed this was done for all users. Restarted R studio server
From a new session in R Studio tried to install RJDBC and got error stating rJava is not installed.
Running R CMD javareconf seems to recognize JAVA home paths but installation of rJava as a non-root user fails.
Highly appreciate any leads.

Related

`pip install ./` cannot call cmake command

I'm working on setting up a project (from someone else), which is currently not able to be installed. Within the root folder I'm trying to run pip install ./, but the installation gives me the following error.
File "C:\Users\ruben\miniconda3\envs\deltaconv\lib\subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cmake', '--version']' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for deltaconv
Failed to build deltaconv
ERROR: Could not build wheels for deltaconv which use PEP 517 and cannot be installed directly
It seems like the setup.py file is unable to locate cmake. However, when running this in the miniconda promt, I get:
>cmake --version
cmake version 3.24.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
And when running it in a windows command prompt I get:
>cmake --version
cmake version 3.24.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
I've installed it both on the windows machine and in python and I'm a bit stuck on why the python subprocess is unable to execute cmake --version.
Hopefully someone can help me with this!

vim-go: could not find 'gopls'

After installing Plug 'fatih/vim-go' Plugin for golang i get few errors
steps:
When opening .go file with vim I get a error:
vim-go: could not find 'gopls' . Run :GoInstallBinaries to fix it
vim-go: could not determine appropriate working directory for go plus
When doing :GoInstallBinaries I get more errors like:
vim-go: guru not found. instaling golang.org..guru#master to folder C:\Users\*MYPC*\go\bin\
vim-go: Error instaling golang.org/x/tools/cmdfuru#master: The system cannot find the path specified.
vim-go: goplus not found. instaling golang.org..goplus#latest to folder C:\Users\*MYPC*\go\bin\
vim-go: Error instaling golang.org..goplus#latest: The system cannot find the path specified.
.
.
.
it does that 8 more times with godef,motion,errcheck,dlv,iferr,golint...
When i do :echo $PATH in Vim i have C:\Users*MYPC*\go\bin\
I am running gvim on Windows 10
golang in cmd or powershell work fine...
Just run go get golang.org/x/tools/gopls#latest, and problem solved!
Answer for WSL (Windows subsystem for Linux):
I tried to installed gopls manually, running go get golang.org/x/tools/gopls#latest but I was getting the following error:
XXXX#XXXX:~$ go get golang.org/x/tools/gopls#latest
go: can only use path#version syntax with 'go get' and 'go install' in module-aware mode
Changing the Go mode fixed the problem at this stage GO111MODULE=on, then I could run
go install golang.org/x/tools/gopls#latest
However, later on, when vim-go was trying to install the missing packages after running GoInstallBinaries I was getting errors that I couldn't use versions with go install. So what I did was reinstall Go (the latest version) on the system using these instructions. After doing that, vim-go was able to install the packages. I hope this answer saves time for future vim-go enthusiasts.
for mac was solved with
brew install gopls
In the vim-go setup instructions, there's a detail about running :GoInstallBinaries in vim after install. You probably missed it (I ran into this issue after I upgraded to a new go runtime)

Make install fails macOS Catalina

I am trying to install OpenCV to use in C++ on my macOS Catalina using the tutorial here: https://www.learnopencv.com/install-opencv-4-on-macos/ . However, near the end when I have to run make install
I get an error saying
Install the project...
-- Install configuration: "RELEASE"
CMake Error at cmake_install.cmake:36 (file):
file cannot create directory: /installation/OpenCV-/share/licenses/opencv4.
Maybe need administrative privileges.
make: *** [install] Error 1
I tried running as root with:
sudo make install
However I get the same error.
I also tried changing the CMAKE_INSTALL_PREFIX to another folder I created which I was the owner of, however this did not work either.
What could I do to make the installation successful?
Thank you.

"installation of package ‘tidyverse’ had non-zero exit status" on MacOS

I mostly work in Python to do data analysis, but am trying to learn R stats as well. Python, Pandas, etc are installed via Anaconda on my Mac laptop.
Today I downloaded R Studio onto my laptop, and tried running install.packages("tidyverse") to get started in R. I ran into this error:
ERROR: dependencies ‘rvest’, ‘xml2’ are not available for package ‘tidyverse’
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status
After Googling for a while I came across a few instances of this exact or similar issue. However, the solutions are not for Mac, e.g.,
sudo apt install libcurl4-openssl-dev libssl-dev libxml2-dev
It turns out Anaconda has already installed libcurl, libxml2 and openssl for me. Is there a way to get Rstudio to ... "look" (?) ... for the compiled libraries it needs where Anaconda has installed them?
If you know where the libraries are (say /my/lib/path) then you could use withr::with_makevars to supplement the library search path. Something like
library(withr)
with_makevars(c(PKG_LIBS="-L/my/lib/path"), install.packages("tidyverse"), assignment="+=")
Personally, I would try to limit this to only the specific packages in tidyverse that are failing, and not the whole umbrella package.

Can anyone advise me on this ? I tried to compile using maven and got this message alongwith "Build Failure" message

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (generate-core-thrift) on project accumulo-core: Command execution failed. Cannot run program "C:\Documents and Settings\deepak\trunk\core\src\main\thrift\thrift.sh" (in directory "C:\Documents and Settings\deepak\trunk\core"): CreateProcess error=193, %1 is not a valid Win32 application -> [Help 1]
I went to the directory trunk containing pom.xml and executed: mvn compile
I tried finding the plugin at http://maven.apache.org/plugins/ but couldn't find any .
Can anyone please explain what the problem is ? These open source things are so complex.
Apache Accumulo does not currently support Windows in its build system. Consider using Ubuntu, Fedora, CentOS, Mac OSX, or another Linux or BSD system. If you really must build in Windows, you my have luck with Cygwin.
It's 2022 and we can now build Apache Accumulo on Windows using Windows Subsystem for Linux.
If you want to access your Linux files from Windows, the path is:
\\wsl$\<DistroName>\home\<UserName>
Note: the above is only available when you have a WSL instance up and running.
Assuming you have a clean install of Ubuntu on WSL. Open a WSL terminal for the setup steps.
Setup
Install OpenJDK
Update list of available packages.
sudo apt update
Search for available JDKs.
apt search jdk
We will be installing JDK11 as Accumulo uses that.
sudo apt-get install openjdk-11-jdk
Check for a successful installation.
java --version
Configure JAVA_HOME
readlink -f $(which java)
Removing /bin/java from the end of the output of the above command gives us the path to the JDK.
nano ~/.bashrc
Add the following line at the bottom of the file.
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
Reflect changes.
source ~/.bashrc
Ensure the changes are in effect.
echo $JAVA_HOME
Install make and g++
sudo apt install make
sudo apt install g++
Build
Clone the repo and cd to repo root.
Now build using (from WSL terminal)
mvn package
If you are using a Windows terminal (likely when using IDEs or GUI tools) prefix wsl,
wsl mvn package
There is another description for error 193: "You may see Windows error code 193 when you are starting a Windows Share Point server or a Windows Exchange server. The error message will also generate general Service Control Manager messages in your system logs, too."
Windows error code 193
Although it doesn't have direct answer on your problem but may be it will be also helpful for you.

Resources