I really love when a software website publishes some very easy instruction to install their product... and I really HATE when those instructions do not work!! Why should a software house do this?? Don't they try them before publishing?? Why should I have to waste half an hour to find out where things have gone wrong, even before beginning to play with their new software??
Well, what I can do is at least to write out for you how to install Elasticsearch (
www.elasticsearch.org), in a clean Ubuntu 12.04 environment. With clean, I mean a new server minimal installation and the two commands apt-get update and apt-get upgrade .
wget -qO - https://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb http://packages.elasticsearch.org/elasticsearch/1.4/debian stable main" | sudo tee -a /etc/apt/sources.list
apt-get update && apt-get install elasticsearch
I do not yet know if this is enough to have a fully working installation of Elasticsearch (but I'm ready to bet it isn't), but in this way at least the installation completes successfully.
LONG ANSWER
These are their instruction as for today:
To begin,
add-apt-repository is not installed by default in both Ubuntu 12.04 and 14.04. To use this tool you need to install
python-software-properties:
sudo apt-get install python-software-properties
Then you can execute the second command of the official instructions, which is:
sudo add-apt-repository "deb http://packages.elasticsearch.org/elasticsearch/1.4/debian stable main"
But this command has the ugly side effect below when you run
apt-get update:
This error should be fairly unhurting, and anyway now you can run
apt-get install elasticsearch and install it successfully.
But, these instruction introduced a probably unnecessary software and an error in you system, even if unharmful. And in my opinion a serious company should avoid in any way those things, especially in the page where people could become your customers. But, hey, I'm the tech guy, not in marketing or management.
And below you can find what introduced this error:
For there isn't a "source" package in Elasticsearch repositories, the
apt-get update command returns an error.
UPDATE:
It seems that
add-apt-repository has different behaviours in different systems and ubuntu versions. Maybe it is a particular version (so it is simply my luck coming back -.-) which has this problem. I don't have in this moment the possibility to test, so I simply report what I can see in the actual system: in my actual Ubuntu 14.04,
add-apt-repository adds the "deb-src" row already commented, so the error doesn't appear.
RELATED POSTS