How to install Hadoop on MacOs? - java

I have MacOs when I install Hadoop I used this Command sudo apt install hadoop-yarn-resourcemanager
I got below error
Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/bin/apt"

apt is the Debian / Ubuntu Linux package management system. What makes you think that MacOs supports Debian packages?!
Instead you could install and use the brew package manager.
See https://isaacchanghau.github.io/post/install_hadoop_mac/ for example.

Related

How to install OpenJDK library?

I created the following environment.yml file from my local Anaconda that contains an openjdk package.
name: venv
channels:
- defaults
dependencies:
- openjdk=11.0.6
However, Azure Machine Learning couldn't install the openjdk package from the environment.yml file as module is not found.
Backstory:
I'm building a machine learning model using H2O.ai Python library. Unfortunately, H2O.ai is written in Java so it requires Java to run. I've installed openjdk to my local Anaconda venv for running H2O.ai locally - it runs perfectly. However, I couldn't deploy this model to Azure Machine Learning because it couldn't install openjdk from requirements.txt or environment.yml as module not found.
Solution:
Install openjdk through conda but specify conda-forge as the channel to install the package from.
name: venv
channels:
- defaults
- conda-forge
dependencies:
- conda-forge::openjdk=11.0.9.1
Do you have terminal access? sudo apt install default-jdk should work on Debian-based systems (such as Ubuntu); or if you need a specific version, e.g. JDK 14: sudo apt install openjdk-14-jdk
Alternatively, there is a guide to installing H2O on Azure in the manual; apparently H2O is available in the Marketplace.

Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/bin/apt" (-1)

I have installed JDK in Mac OS.
I am trying to install Apache2,
sudo apt install apache2
Output :-
Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/bin/apt" (-1)
But, executable file is present in /Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/
$find /Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home -name java*
/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/bin/java
/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/bin/javac
I have installed JDK in Mac OS.
Well, apt is not an MacOS command for package installation. Wherever you copied those instructions from was for Debian/Ubuntu, not Mac
If you want to install Apache HTTPd on Mac, I'd recommend using Homebrew or Docker. And if using Docker, you don't need Java installed on your Mac
You are not querying for the file they are asking home/bin/apt
If you look in your folder you will not find this file most likely.
Try installing an older version of the sdk.

How to change the version of java installed in BOSS Linux?

I am trying to change java installed in boss Linux because am trying to install eclipse oxygen which needs java8. First I couldn't find where the jdk installed. Currently 1.7.0_73 installed. I just downloaded the tar.gz of jdk8. Extracted in a location. Setted java home and path pointing bin. But still am getting error during eclipse installation that version 1.8 is required.
Well as Wikipedia states that
BOSS Linux is an "LSB certified" Linux distribution :
the software has been certified by the Linux Foundation
for compliance with the Linux Standard Base standard.
BOSS Linux is derived from Debian Linux.
Note that It is derived from Debian Linux and uses apt to handle packages for updates or upgrades. On that note, you just have to use apt
command to upgrade to version you want.
Installing java version 1.8 by installing OpenJDK v8
To install java version 1.8 (OpenJDK v8), type following on terminal :
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk
If you only want to install the Java Runtime Environment :
sudo apt-get install openjdk-8-jre
Feel free to add-in more details to the answer.

How can I install Eclipse and Java SDK on Ubuntu?

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.

Launch4j maven plugin will not work on 64-bit linux machine

I am trying to use the maven Launch4j plugin version 1.5.0.1
When I build the pom on my windows box, there is no issue (my windows box has both 32-bit and 64-bit versions of Java installed). But when I build the pom on my linux box, I get this issue:
Stack trace:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.bluestemsoftware.open.maven.plugin:launch4j-plugin:1.5.01.1..... Failed to build executable; please verify your configuration
Cause by: net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/home/hudson/.m2/repository/org/bluestemsoftware/open/maven/plugin/launch4j-plugin/1.5.0.1/launch4j-plugin-1.5.0.1-workdir-linux/bin/windres": java.IOException: error=2, No such file or directory
I did quite a bit of digging around and I found this:
http://alakai.org:8088/browse/LAUNCHPLUGIN-15
But, the task is still open, so I can only assume that there is no fix in place for this issue on a 64-bit Linux OS that uses 64-bit java. Unfortunately, my linux box cannot access an external network, so installing 32-bit java is not much of an option. Does anyone know of any other possible work-arounds?
Just install ia32-libs for your distrib. On my ubuntu machine: sudo apt-get install ia32-libs
On recent x64 Ubuntu distributions (starting 14.04 LTS, tested on 16.04 LTS), do this:
$ sudo dpkg --add-architecture i386
$ sudo apt-get update
$ sudo apt-get install lib32z1 lib32ncurses5 libbz2-1.0:i386
For Fedora, install the 32 bit version of openjdk-devel. java-1.6.0-openjdk-devel.i686 or java-1.7.0-openjdk-devel.i686.
yum install java-1.6.0-openjdk-devel.i686
... or ...
yum install java-1.7.0-openjdk-devel.i686
Use yumdownloader on a different machine if you can not reach the network.

Categories