I am on an Ubuntu 18.04 machine with R version 3.5.1, installed following this link. I am trying to install the CRAN package rJava, which I do the following way (as seen here):
sudo apt-get install r-cran-rjava
However, I get this:
The following packages have unmet dependencies:
r-cran-rjava : Depends: r-api-3.4
E: Unable to correct problems, you have held broken packages.
But when I try:
sudo apt-get install r-api-3.4
I get:
E: Package 'r-api-3.4' has no installation candidate
How to overcome this problem with r-api-3.4? Basically, I need to install rJava to be able to install and use XLConnect... In Ubuntu 16.04, I had no problems whatsoever...
EDIT:
Apparently, r-api-3.4 should be provided by r-base-core. I do have r-base-core installed in its newest version, why do I still see errors then?
The API versions are provided by r-base-core. The reason is that binary packages (sometimes) depend on the R version, for which they have been build. This way you can only install packages that fit together.
In your case you have packages from the main Ubuntu repository (r-base-core 3.4.x providing r-api-3.4 and r-cran-rjava requiring r-api-3.4) and from a custom PPA (r-base-core 3.5.y providing r-api-3.5). One option would be to only use the version from Ubuntu, i.e. R 3.4. Another solution is to add an additional PPA:
sudo add-apt-repository ppa:marutter/c2d4u3.5
sudo apt-get update
After that a version of r-cran-rjava requiring r-api-3.5 should be available.
See also http://rubuntu.netlify.com/post/2018-05-25-announcing-c2d4u3-5/ and http://rubuntu.netlify.com/post/2018-06-11-r-3.5-on-debian-and-ubuntu-update/.
Finally, you always have the possibility to install the R packages directly from CRAN. That is currently the only possibility when you are using the CRAN supplied R backports on Debian.
Related
I'm using jBlas and it require libgfortran3 and tell me to install it from:
sudo apt-get install libgfortran3
But I'm using Lubuntu 20.04, which use the same packages as Ubuntu 20.04. I can't find the package here
https://packages.ubuntu.com/search?keywords=libgfortran3
So what should I do?
In short, libgfortran3 is no longer supported in Ubuntu 20.04. It depends on an older version of gcc which is no longer maintained in this version of the distribution.
As an alternative, you might want to try installing its successor package with:
sudo apt-get install libgfortran5
It will provide these files for your Ubuntu installation:
/usr/lib/x86_64-linux-gnu/libgfortran.so.5
/usr/lib/x86_64-linux-gnu/libgfortran.so.5.0.0
/usr/share/doc/libgfortran5
This way, you have an option of dynamically loading/linking against libgfortran at runtime.
Hope it helps.
If you have to use libgfortran3, you can just copy a libgfortran.so.3 in /usr/lib/x86_64-linux-gnu/.
It works for me.
I am on Debian 9 and am trying to install OpenJDK 8. When I enter the command sudo apt install openjdk-8-jre-headless, however, I get an error saying E: Package 'openjdk-8-jre-headless' has no installation candidate. I have installed build-essential and git, but it still does not work. Does anyone know how to fix this?
git has nothing to do with it. Your OS can't find a package containing openJDK 8. Try apt-cache openjdk-8 to see if there are any known packages containing what you need.
If the cachecommand finds a package, use your favorite editor to add it to /etc/apt/sources.list and try installing again.
If cache cannot find what you want in a current package, search through old packages at http://snapshot.debian.org/.
You can download by the following way :
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jre
I need to install only the JRE package of OpenJDK. I am not able to find it anywhere. Is there a package available?
I tried searching the web as well. I found no package like that.
If you check official page, JDK and JRE were different before Java 9, but from Java 9-10-11, it is not different anymore.
For Java-8 and before there were separate commands
sudo apt-get install openjdk-8-jre
sudo apt-get install openjdk-8-jdk
More info at here
I have just downloaded Ubuntu. It runs much faster than my Windows XP. But, I don't know how I can set up Eclipse v4.2 (Juno), or the Java SDK. I am currently developing in the Lightweight Java Game Library, so I might need some help with that too.
Execute this in your terminal:
sudo apt-get install eclipse
sudo apt-get install openjdk-6-jdk openjdk-6-source openjdk-6-demo openjdk-6-doc openjdk-6-jre-headless openjdk-6-jre-lib
The first one installs Eclipse (you will be asked to enter your password), and the second one installs all the Java stuff you may need!
Don't install Eclipse from the Linux repositories. These repositories may not be up-to-date with the last versions released by Eclipse. A better approach is to follow the instructions in this answer from Ask Ubuntu. For Java programming, make sure you have a JDK and a JRE installed
apt-get install openjdk-7-jdk openjdk-7-jre
You can download whatever Eclipse Java IDE version suits you best from the Eclipse website (link to the Eclipse v4.4 (Luna) release).
You might want to consider installing Sun Java 6 for your Java programming needs; correct me if I'm wrong, but I feel that OpenJDK may still be lacking in some libraries and compatibilities.
If you want to install Java 6 on your machine, you can follow this guide on how to do so: https://codingforme.wordpress.com/2012/05/14/installing-oracle-java-jdk-6-or-7-on-ubuntu-12-04/
Java installation on Ubuntu:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
Eclipse IDE installation on Ubuntu:
Since it requires a detailed list of steps, I would suggest you to visit the blog post Install Eclipse IDE Mars in Linux Ubuntu to check out steps to install Eclipse on Linux Ubuntu.
You don't really install Eclipse - you just download the folder and run the program - just like in windows. Just make sure you download a Linux version.
To install JDK, type:
sudo apt-get install openjdk-6-jdk
You will be asked to type in your password before the installation will begin. You could also install JDK through the software manager.
Just remove all Eclipse packages typing:
sudo apt-get autoremove eclipse
And with tab find all installed Eclipse packages.
Do the same with Java.
I just reinstalled Eclipse with the command
sudo apt-get install eclipse
which also contains Java.
How do I fix this?
I am on ubuntu 64 using Eclipse indigo. I installed http://subclipse.tigris.org/update_1.8.x.
At first I got this error:
Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
no svnjavahl-1 in java.library.path
no svnjavahl in java.library.path
java.library.path = /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
Then after some googling I did this:
sudo apt-get install libsvn-java
Then in the eclipse.ini I added this line:
-Djava.library.path=/usr/lib/jni
I then created this directory and contents:
~/.eclipse/eclipserc
VMARGS="-Djava.library.path=/usr/lib/jni"
I am still getting this error:
Incompatible JavaHL library loaded. 1.7.x or later required.
What more can I do?
Remove your existing libsvn-java:
sudo apt-get purge libsvn-java
Then, add the following software source and re-install:
sudo add-apt-repository ppa:dominik-stadler/subversion-1.7
sudo apt-get update
sudo apt-get install libsvn-java
(found here)
thanks to #codemonkeybr: also update your eclipse.ini with -Djava.library.path=/usr/lib/jni
(or /usr/lib/x86_64-linux-gnu/jni or /usr/lib/i386-linux-gnu/jni depending on your system ...)
Update for Ubuntu 14 use Subversion 1.8 instead:
sudo add-apt-repository ppa:dominik-stadler/subversion-1.8
On Ubuntu 64 (12.04 or 12.10), try /usr/lib/x86_64-linux-gnu/jni
Good luck
And on Ubuntu 32 (12.04), modify the eclipse.ini:
-Djava.library.path=/usr/lib/i386-linux-gnu/jni
For those who are reluctant to install any software from third party repositories I would just recommend to install version 1.6.x of Subclipse instead of the latest 1.8.x one.
Details can be found here
For those following #jlb's instructions above but getting the following (or similar) error:
Failed to fetch http://ppa.launchpad.net/dominik-stadler/subversion-1.7/ubuntu/dists/trusty/main/source/Sources 404 Not Found
That repository hasn't been updated for later versions of Ubuntu, but the equivalent subversion-1.8 repository has.
First, remove the 1.7 repository in Synaptic Package Manager (instructions here: http://www.maketecheasier.com/remove-repositories-in-ubuntu/ ), then:
sudo add-apt-repository ppa:dominik-stadler/subversion-1.8
sudo apt-get update
sudo apt-get install libsvn-java
And follow the rest of the instructions on editing eclipse.ini as above.
check out this topic:
Installing Subversion JavaHL library in Mac OS X
u may change the SVN interface of Eclipse to SVNKit(pure java)