Installing JDK 1.6 and maven2 on Vagrant Box - vagrant

I am trying to install jdk 1.6 and maven2 on my vagrant box.
But most of the times installation of those two packages fails. I am using following command to install the same.
sudo apt-get install openjdk-6-jdk
sudo apt-get install maven2

Related

vagrant command not running for magento setup

How do I run a command in vagrant?
While using below commands for install magento setup:
vagrant#precise64:~/magento2$ sudo dnf install httpd
I get the following error:
sudo: dnf: command not found
So, how do I run a command in vagrant?
Try using apt for package installation on precise 64 box.
You can do sudo apt-get install apache2
To configure it, you can use vim/nano to modify:
/etc/apache2/apache2.conf
DNF Package manager is not available on hashicorp/Precise64 as it's not .rpm based.
From DNF WIKI:
DNF is a software package manager that installs, updates, and removes
packages on RPM-based Linux distributions

CentOS 6.5 - How to upgrade HAProxy?

Can someone tell me how to upgrade HAProxy from 1.5.4 version to the latest version?
I'm using a virtual machine CentOS 6.5.
Thanks a lot ;)
HAProxy up to 1.5.4 is available for Centos via the package repository, so to get a newer version you will have to compile from source.
To upgrade to the latest version, you could follow these instructions to make your own installable package.
In summary:
sudo yum install rpmdevtools pcre-devel
rpmdev-setuptree
sudo yum groupinstall 'Development Tools'
sudo yum install openssl-devel
wget http://www.haproxy.org/download/1.6/src/haproxy-1.6.9.tar.gz
mv haproxy-1.6.9.tar.gz ~/rpmbuild/SOURCES/
git clone git://github.com/bluerail/haproxy-centos.git
cp haproxy-centos/conf/* ~/rpmbuild/SOURCES/
cp haproxy-centos/spec/* ~/rpmbuild/SPECS/
cd ~/rpmbuild/
rpmbuild -ba SPECS/haproxy.spec
The RPM should be available in ~/rpmbuild/RPMS/x86_64. You can install it like:
sudo rpm -Uvh RPMS/x86_64/haproxy-1.6-9.x86_64.rpm
Try the following yum command:
yum update haproxy
According to a quick repo search, this should update to HAProxy 1.5.4. Prove the version change with:
haproxy -v

Can't find package php7.0-curl

I have a problem for installing php7.0-curl on my homestead.
On my Laravel homestead:
sudo apt-get install php7.0-curl
It returns :
E: Could not find package php7.0-curl
E: Could not find package matching the regex « php7.0-curl »
Note: if I run in my terminal just : curl --help it's working.
For info, my computer runs on:
Distributor ID: Ubuntu
Description:Ubuntu 15.04
Release: 15.04
Codename: vivid
Try this :
sudo add-apt-repository ppa:ondrej/php-7.0
sudo apt-get install software-properties-common -y
sudo apt-get update
sudo apt-cache search php7.0-curl
If you find it in php7.0-curl then install it using
sudo apt-get install php7.0-curl
Hope it helps.
The package php7.0-curl is only available on Ubuntu 16.04 LTS (xenial) and on Ubuntu 16.10 (yakkety, to be released).
Your current version of Ubuntu, 15.04 (vivid) has reached end of life the February 4, 2016
You can try to import the package from one of these distributions and resolve dependencies by hand but it would be much safer to install Ubuntu 16.04 LTS.
By the way, if you want to install php7.0-curl inside Laravel Homestead, you need to insure that the ubuntu version running inside Laravel Homestead is greater or equal to 16.04.

Maven Installation in linux fails with "The following packages have unmet dependencies" error

I am new to Linux I was trying to install Maven with
sudo apt-get install maven
I hit upon this error
Do you want to continue? [Y/n] Y
Get:1 http://ubuntu.excellmedia.net/archive/ utopic-updates/main openjdk-7-jre-headless amd64 7u75-2.5.4-1~utopic1 [39.7 MB]
Fetched 1,031 B in 0s (7,897 B/s)
E: Failed to fetch http://ubuntu.excellmedia.net/archive/pool/main/o/openjdk-7/openjdk-7-jre-headless_7u75-2.5.4-1~utopic1_amd64.deb Size mismatch
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
On googling i found out that I had to do
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove
and followed that
Now after doing above clean I tried installing again with
sudo apt-get install maven
but now i am getting the following different error :-(
The following packages have unmet dependencies:
maven : Depends: libaether-java but it is not going to be installed
Depends: libplexus-containers1.5-java but it is not going to be installed
Depends: libsisu-ioc-java but it is not going to be installed
Depends: libwagon2-java (>= 2.2-2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
ubuntu#ubuntu:~$
I tired
sudo apt-get update
but it dint work I am currently using "Ubuntu 14.10".
Plz help
Try this out:
sudo apt-get -f install
This will cause apt to scan and fix missing dependencies and fix them from the repositories configured for your system. Try installing maven again after this.

Building irods-rest with Maven 3

I'm trying to install irods-rest on Ubuntu 14.04. This are the steps that I have follow untill now:
Maven 3 Installation
sudo apt-get purge maven maven2 maven3
sudo apt-add-repository ppa:andrei-pozolotin/maven3
sudo apt-get update
sudo apt-get install maven3
Irods-Rest Installation
git clone https://github.com/DICE-UNC/irods-rest.git
cd irods-rest/
mvn package -Dmaven.test.skip=true
but I get this error:
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project irods-rest: Fatal error compiling: invalid target release: 1.8
Can somebody help me?
EDIT:
I solved this issue after installing java 8 (before I had java 7)

Resources