This are my experiences in a fresh VPS @ digitalocean.
So, I’m trying to run kurento following their tutorials.
- http://kurento.com/docs/current/installation_guide.html
- http://kurento.com/docs/current/tutorials/java/tutorial-3-one2many.html
The program ‘git’ is currently not installed.
root@kurento:/home# git clone https://github.com/Kurento/kurento-tutorial-java.git The program 'git' is currently not installed. You can install it by typing: apt-get install git
The program ‘mvn’ can be found in (not installed)
root@kurento:/home/kurento-tutorial-java/kurento-one2many-call# mvn compile exec:java The program 'mvn' can be found in the following packages: * maven * maven2 Try: apt-get install <selected package>
Lets install it with apt-get install maven.
Warning: JAVA_HOME environment variable is not set.
Lets find out the JAVA_HOME path…
root@kurento:/home/kurento-tutorial-java/kurento-one2many-call# update-java-alternatives --list
java-1.7.0-openjdk-amd64 1071 /usr/lib/jvm/java-1.7.0-openjdk-amd64
This is how I’v setted it up with the following 4 lines…
export JAVA_HOME="/usr/lib/jvm/java-1.7.0-openjdk-amd64" export PATH=$PATH:$JAVA_HOME/bin javac -version which javac
Cannot run program “bower”
Lets install nodejs
sudo apt-get install nodejs
Then lets install bower
sudo npm install bower -g
openjdk-7-jdk
Lets install openjdk-7-jdk, ’cause we are going to need it…
apt-get install openjdk-7-jdk
We can’t run it with sudo / root
Lets switch to another user ’cause we can’t run it with user.
If we don’t have another user we need to create him using adduser.
Lets change for this new user… with su *newuser*.
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.2:exec
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.2:exec (default) on project kurento-one2many-call: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
This is caused ’cause files and folder were created under root… lets allow this new user to write/read them with a chmod …
LifecycleProcessor not initialized – call ‘refresh’ before invoking lifecycle methods via the context
I’m stucked on this!
====== CUT HERE =====
[INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- exec-maven-plugin:1.3.2:exec (default) @ kurento-one2many-call --- bower ESUDO Cannot be run with sudo
- 1st problem – Cannot run program “bower”
- 2nd problem – We can run it with sudo / root
create a user and on their ~ make the tutorial steps
Cannot be run with sudo
Since this is a fresh system, I had to create a new user (useradd) switch to it and preform the commands, to install it on a non-root folder and where my user has access…
Please ensure you are using JDK 1.4 or above and not a JRE
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project kurento-one2many-call: Compilation failure [ERROR] Unable to locate the Javac Compiler in: [ERROR] /usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar [ERROR] Please ensure you are using JDK 1.4 or above and [ERROR] not a JRE (the com.sun.tools.javac.Main class is required).
root@kurento:~/kurento-tutorial-java/kurento-one2many-call# mvn compile exec:java Warning: JAVA_HOME environment variable is not set. [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Kurento Java Tutorial 3 - One2Many Call 5.1.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- exec-maven-plugin:1.3.2:exec (default) @ kurento-one2many-call --- bower ESUDO Cannot be run with sudo
Well, I was on /root… so, if
asd
Some resources
http://stackoverflow.com/questions/6790278/java-home-environment-variable-not-set-validator-nu-html-parser
http://stackoverflow.com/questions/10812668/unable-to-locate-the-javac-compiler