can not install mvn 3.3.3 on ubuntu 14.04 - maven

I am using Ubuntu 14.04. I need to run mvn 3.3.3. Currently, the installed mvn version 3.0.5. When I enter
sudo apt-get install maven
it says
maven is already the newest version
is there a way to force install mvn 3.3.3?

Add a ppa containing maven 3.3.3, for example this one by executing these instructions on the command-line:
sudo apt-get purge maven maven2 maven3
sudo add-apt-repository ppa:andrei-pozolotin/maven3
sudo apt-get update
sudo apt-get install maven3

If you are not comfortable with a PPA (personal package archive) where you have no assurance of the provenance this is an alternative.
From a security perspective if you don't know where it came from don't install it.
In my linked article I retrieve the latest file from apache which is a known and trusted source. You can get the latest version
\#identify the latest version of maven
latest=$(curl http://www-us.apache.org/dist/maven/maven-3/ | tac | sed -ne 's/[^0-9]*\(\([0-9]\.\)\{0,3\}[0-9]\).*/\1/p' | head -1)
\#download it
wget http://www-us.apache.org/dist/maven/maven-3/$latest/binaries/apache-maven-$latest-bin.tar.gz
then install it from
\#Unpack it
sudo tar -zxf apache-maven-$latest-bin.tar.gz -C /usr/local/
\#create a sym link to it
sudo ln -s /usr/local/apache-maven-$latest/bin/mvn /usr/bin/mvn
as outlined in the link above.

I just installed maven 3.2.5.
To do that I downloaded the version I wanted as noted.
Unzipped using: tar -xvf apache-maven-3.2.5-bin.tar.gz
to: /opt/ and let p7zip do its thing.
Then in the terminal I did the following:
Check environment variable value:
echo $JAVA_HOME
Adding to PATH:
export PATH=/opt/apache-maven-3.2.5/bin:$PATH
typed: mvn -v
reviewed the output
For me the above worked fine.

Related

How to downgrade libprotobuf.so

I'm trying to run a .pyc which shows this msg:
ImportError: libprotobuf.so.9: cannot open shared object file: No such file or directory
I have a newer version of libprotobuf.
Do you know how to solve this issue? I think the only way is to downgrade libprotobuf. But how can I do that and install the exact version it is asking me for?
Thanks in advance
My ubuntu 18.04 had a same problem and I solved it as follows.
Here are different version libprotobuf
(https://pkgs.org/download/libprotobuf)
$ sudo apt-get update
$ sudo apt-get install gdebi
$ wget http://archive.ubuntu.com/ubuntu/pool/main/p/protobuf/libprotobuf9v5_2.6.1-1.3_amd64.deb
$ sudo gdebi ./libprotobuf9v5_2.6.1-1.3_amd64.deb
You can use gdebi to install this deb package solving dependencies.

How to update golang on codeanywhere.com with Ubuntu

How to update golang on codeanywhere.com with Ubuntu 14.04?
The default container uses the version from Ubuntu repos, instead of golang PPA.
As of writing it's 1.6 and the newest version is 1.9.
(can't comment yet) Just an additional information, the steps in Paweł Prażak's answer work when you run on a Blank Container. If you run them on a Go predefined stack it won't update.
I also recommend to change the GOPATH value to your workspace, running
export GOPATH=$HOME/go
Then run go env to check if the values are correctly updated.
Thanks for the answer by the way, Paweł!
You can easily install the latest golang release in the container by using this script:
git clone https://github.com/udhos/update-golang
cd update-golang
sudo ./update-golang.sh
Full details: https://github.com/udhos/update-golang
Create and new Blank Container with Ubuntu:
Connect to the container with SSH.
Follow the instructions on the official wiki.
First install the add-apt-repository support:
sudo apt-get update
sudo apt-get install -y software-properties-common
Now install the recent version of golang (refer to the wiki for up to date instructions):
sudo add-apt-repository ppa:gophers/archive
sudo apt-get update
sudo apt-get install golang-1.9-go
Make sure to put the binary on PATH, e.g.:
sudo ln -s /usr/lib/go-1.9/bin/go /usr/local/bin/go
Now the newer version should be available:
$ go version
go version go1.9.2 linux/amd64
Add $GOPATH pointing to the workspace and add $GOPATH/bin to $PATH in ~/.profile:
cat << EOF >> ~/.profile
export GOPATH="\$HOME/workspace"
export PATH="\$GOPATH/bin:\$PATH"
EOF
Apply the new ~/.profile:
. ~/.profile
Also make is missing, if you need it:
sudo apt-get install build-essential

How to install Rabbitvcs on centos7?

I'm used to tortoise SVN. But after switching to centos 7 it is very difficult to use it without GUI. Please Help me install RabbitVCS instead.
The below instructions worked for me in May 2019. YMMV.
Install EPEL Release
export http_proxy=http://{proxyhost}:{port}
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install epel-release-latest-7.noarch.rpm
Install Pre-requisites
sudo yum install meld pysvn python-dulwich python-simplejson
Fetch RabbitVCS packages
export ftp_proxy=$http_proxy
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/hmandevteam/CentOS_7/noarch/rabbitvcs-core-0.17.1-3.2.noarch.rpm
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/hmandevteam/CentOS_7/noarch/rabbitvcs-cli-0.17.1-3.2.noarch.rpm
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/hmandevteam/CentOS_7/noarch/python2-rabbitvcs-0.17.1-3.2.noarch.rpm
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/hmandevteam/CentOS_7/noarch/rabbitvcs-nautilus-0.17.1-3.2.noarch.rpm
Install RabbitVCS packages
sudo yum install rabbitvcs-core-0.17.1-3.2.noarch.rpm
sudo yum install rabbitvcs-cli-0.17.1-3.2.noarch.rpm
sudo yum install python2-rabbitvcs-0.17.1-3.2.noarch.rpm
sudo yum install rabbitvcs-nautilus-0.17.1-3.2.noarch.rpm
Reboot
sudo reboot
Open File Manager and you can see RabbitVCS Menu
If the above rpm ftp locations become stale, goto http://rpm.pbone.net and search for the following packages with Centos 7 filter -
rabbitvcs-core
rabbitvcs-cli
python2-rabbitvcs
rabbitvcs-nautilus
You may find these packages at other locations too
NOTE: You may sometimes require these pre-requisite packages too pygtk, python-configobj, python-gobject, python-gtkspell, python-svn
I had same problem when working with centos7, ended up using thunar instead of nautilus. See stackexchange and github issue.
Update:
I have successfully build rabbitVCS following steps from the github.com and then copied the nautilus extension.

Finding JDK after installing Java via PPA repository

Where do I find the java JDK after installing it via PPA repository in Linux Mint? I followed this to install it:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo update-java-alternatives -s java-8-oracle
Running java and javac work, showing version java version "1.8.0_101". Running whereis shows both binaries at /usr/bin/ folder. Running printenv JAVA_HOME shows me the /usr/ directory (I set it by hand, I assumed that was the proper folder).
When I run NetBeans, though, it cant find the jdkhome. I've changed netbeans.conf to have netbeans_jdkhome="/usr/", and I also tried running with the --jdkhome /usr/ option, but to no avail.
What directory should be the JDK home after installing Java the way I have? Or how do I find it?
Checkout ls -l /usr/bin/java to see where does the symbolic link point to.
Or you can also try:
update-alternatives --all | grep java

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

Resources