# Install Elasticsearch 1.0.1 on Ubuntu 12.04 fails with sudo dpkg -i elasticsearch-1.0.1.deb

**URL:** https://discuss.elastic.co/t/install-elasticsearch-1-0-1-on-ubuntu-12-04-fails-with-sudo-dpkg-i-elasticsearch-1-0-1-deb/16561
**Category:** Elasticsearch
**Created:** [March 24, 2014, 9:53am UTC](https://discuss.elastic.co/t/install-elasticsearch-1-0-1-on-ubuntu-12-04-fails-with-sudo-dpkg-i-elasticsearch-1-0-1-deb/16561 "2014-03-24T09:53:20Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Patrick\_Lock](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@Patrick\_Lock](https://discuss.elastic.co/u/Patrick_Lock)
#### Post date: [March 24, 2014, 9:53am UTC](https://discuss.elastic.co/t/install-elasticsearch-1-0-1-on-ubuntu-12-04-fails-with-sudo-dpkg-i-elasticsearch-1-0-1-deb/16561/1 "2014-03-24T09:53:20Z")

</div>

I am trying to install Elasticsearch 1.0.1 on Ubuntu 12.04. So far I have  
done:

First I removed the old elasticsearch 0.90 package

sudo dpkg -r elasticsearch

Then

cd ~  
sudo apt-get update  
sudo apt-get install openjdk-7-jre-headless -y

wget [https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb](https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb)  
sudo dpkg -i elasticsearch-1.0.1.deb

The last step results in the following

(Reading database ... 57341 files and directories currently installed.)  
Preparing to replace elasticsearch 1.0.1 (using elasticsearch-1.0.1.deb) ...  
Unpacking replacement elasticsearch ...  
Setting up elasticsearch (1.0.1) ...  
chown: cannot access `/etc/elasticsearch/\*': No such file or directory

So I created /etc/elasticsearch with a dummy file in it and then did

sudo chmod 777 /etc/elasticsearch

Now when I run

sudo dpkg -i elasticsearch-1.0.1.deb

I get

(Reading database ... 57341 files and directories currently installed.)  
Preparing to replace elasticsearch 1.0.1 (using elasticsearch-1.0.1.deb) ...  
Unpacking replacement elasticsearch ...  
Setting up elasticsearch (1.0.1) ...  
Processing triggers for ureadahead ...

But nothing appears in /etc/elasticsearch

However I do get a folder appear in

/usr/share/elasticsearch

With the following contents

bin core-signatures.txt lib NOTICE.txt README.textile

From here if I run

sudo bin/elasticsearch

I get

log4j:WARN No appenders could be found for logger (node). log4j:WARN Please  
initialize the log4j system properly. log4j:WARN See  
[http://logging.apache.org/log4j/1.2/faq.html#noconfig](http://logging.apache.org/log4j/1.2/faq.html#noconfig) for more info.

And continues to run

If I open a new window and run

curl -XGET 'localhost:9200'

I get

{  
"status" : 200,  
"name" : "Volstagg",  
"version" : {  
"number" : "1.0.1",  
"build\_hash" : "5c03844e1978e5cc924dab2a423dc63ce881c42b",  
"build\_timestamp" : "2014-02-25T15:52:53Z",  
"build\_snapshot" : false,  
"lucene\_version" : "4.6"  
},  
"tagline" : "You Know, for Search"  
}

So it appears to be running, and I can populate the search (symfony2  
FOSElasticaBundle) with

php app/console fos:elastica:populate

But if I do a search no results are found.

There is nothing in /etc/elasticsearch apart from the dummy file I placed  
in there.

I have found the configuration file at /etc/default/elasticsearch which is  
all commented out at present.

The Symfony2 error I get when trying to search is: ERROR - Caught  
exception: SearchPhaseExecutionException[Failed to execute phase [query],  
all shards failed

So the question is please, has it installed or not and why isn't it working  
properly?

Thanks

Patrick

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/0dd824da-8c36-4954-9d3f-ffd037a36ab8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0dd824da-8c36-4954-9d3f-ffd037a36ab8%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Patrick\_Lock](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@Patrick\_Lock](https://discuss.elastic.co/u/Patrick_Lock)
#### Post date: [March 25, 2014, 10:36am UTC](https://discuss.elastic.co/t/install-elasticsearch-1-0-1-on-ubuntu-12-04-fails-with-sudo-dpkg-i-elasticsearch-1-0-1-deb/16561/2 "2014-03-25T10:36:13Z")

</div>

If I run

curl -XGET 'localhost:9200/\_cluster/health?pretty'

I get  
{

"cluster\_name" : "elasticsearch",

"status" : "yellow",

"timed\_out" : false,

"number\_of\_nodes" : 1,

"number\_of\_data\_nodes" : 1,

"active\_primary\_shards" : 5,

"active\_shards" : 5,

"relocating\_shards" : 0,

"initializing\_shards" : 0,

"unassigned\_shards" : 5

}

On Monday, 24 March 2014 09:53:20 UTC, Patrick Lock wrote:

> I am trying to install Elasticsearch 1.0.1 on Ubuntu 12.04. So far I have  
> done:
> 
> First I removed the old elasticsearch 0.90 package
> 
> sudo dpkg -r elasticsearch
> 
> Then
> 
> cd ~  
> sudo apt-get update  
> sudo apt-get install openjdk-7-jre-headless -y
> 
> wget [https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb](https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb)  
> sudo dpkg -i elasticsearch-1.0.1.deb
> 
> The last step results in the following
> 
> (Reading database ... 57341 files and directories currently installed.)  
> Preparing to replace elasticsearch 1.0.1 (using elasticsearch-1.0.1.deb) ...  
> Unpacking replacement elasticsearch ...  
> Setting up elasticsearch (1.0.1) ...  
> chown: cannot access `/etc/elasticsearch/\*': No such file or directory
> 
> So I created /etc/elasticsearch with a dummy file in it and then did
> 
> sudo chmod 777 /etc/elasticsearch
> 
> Now when I run
> 
> sudo dpkg -i elasticsearch-1.0.1.deb
> 
> I get
> 
> (Reading database ... 57341 files and directories currently installed.)  
> Preparing to replace elasticsearch 1.0.1 (using elasticsearch-1.0.1.deb) ...  
> Unpacking replacement elasticsearch ...  
> Setting up elasticsearch (1.0.1) ...  
> Processing triggers for ureadahead ...
> 
> But nothing appears in /etc/elasticsearch
> 
> However I do get a folder appear in
> 
> /usr/share/elasticsearch
> 
> With the following contents
> 
> bin core-signatures.txt lib NOTICE.txt README.textile
> 
> From here if I run
> 
> sudo bin/elasticsearch
> 
> I get
> 
> log4j:WARN No appenders could be found for logger (node). log4j:WARN  
> Please initialize the log4j system properly. log4j:WARN See  
> [Apache log4j 1.2 - Frequently Asked Technical Questions](http://logging.apache.org/log4j/1.2/faq.html#noconfig) for more info.
> 
> And continues to run
> 
> If I open a new window and run
> 
> curl -XGET 'localhost:9200'
> 
> I get
> 
> {  
> "status" : 200,  
> "name" : "Volstagg",  
> "version" : {  
> "number" : "1.0.1",  
> "build\_hash" : "5c03844e1978e5cc924dab2a423dc63ce881c42b",  
> "build\_timestamp" : "2014-02-25T15:52:53Z",  
> "build\_snapshot" : false,  
> "lucene\_version" : "4.6"  
> },  
> "tagline" : "You Know, for Search"  
> }
> 
> So it appears to be running, and I can populate the search (symfony2  
> FOSElasticaBundle) with
> 
> php app/console fos:elastica:populate
> 
> But if I do a search no results are found.
> 
> There is nothing in /etc/elasticsearch apart from the dummy file I placed  
> in there.
> 
> I have found the configuration file at /etc/default/elasticsearch which is  
> all commented out at present.
> 
> The Symfony2 error I get when trying to search is: ERROR - Caught  
> exception: SearchPhaseExecutionException[Failed to execute phase [query],  
> all shards failed
> 
> So the question is please, has it installed or not and why isn't it  
> working properly?
> 
> Thanks
> 
> Patrick

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7d4f0189-a835-4ac7-af9a-b518ad7662d8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7d4f0189-a835-4ac7-af9a-b518ad7662d8%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Patrick\_Lock](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@Patrick\_Lock](https://discuss.elastic.co/u/Patrick_Lock)
#### Post date: [March 25, 2014, 1:59pm UTC](https://discuss.elastic.co/t/install-elasticsearch-1-0-1-on-ubuntu-12-04-fails-with-sudo-dpkg-i-elasticsearch-1-0-1-deb/16561/3 "2014-03-25T13:59:15Z")

</div>

I have managed to install elasticsearch- 1.0.1 by using an old method

cd ~  
wget [https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.tar.gz](https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.tar.gz)  
tar -xf elasticsearch-1.0.1.tar.gz  
cd /usr/local/  
sudo mkdir elasticsearch  
cd elasticsearch  
cd ~  
sudo mv elasticsearch-1.0.1 /usr/local/elasticsearch/

now if I run

enter code here

curl -XGET 'localhost:9200'

it returns

{  
"status" : 200,  
"name" : "Mister Jip",  
"version" : {  
"number" : "1.0.1",  
"build\_hash" : "5c03844e1978e5cc924dab2a423dc63ce881c42b",  
"build\_timestamp" : "2014-02-25T15:52:53Z",  
"build\_snapshot" : false,  
"lucene\_version" : "4.6"  
},  
"tagline" : "You Know, for Search"  
}

curl -XGET 'localhost:9200/\_cluster/health?pretty'

now returns:

{  
"cluster\_name" : "elasticsearch",  
"status" : "green",  
"timed\_out" : false,  
"number\_of\_nodes" : 2,  
"number\_of\_data\_nodes" : 2,  
"active\_primary\_shards" : 5,  
"active\_shards" : 10,  
"relocating\_shards" : 0,  
"initializing\_shards" : 0,  
"unassigned\_shards" : 0  
}

I can populate my search indexes and all is working fine. I still don't  
know why I couldn't install with the package installer so my original  
question is unanswered.

On Monday, 24 March 2014 09:53:20 UTC, Patrick Lock wrote:

> I am trying to install Elasticsearch 1.0.1 on Ubuntu 12.04. So far I have  
> done:
> 
> First I removed the old elasticsearch 0.90 package
> 
> sudo dpkg -r elasticsearch
> 
> Then
> 
> cd ~  
> sudo apt-get update  
> sudo apt-get install openjdk-7-jre-headless -y
> 
> wget [https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb](https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb)  
> sudo dpkg -i elasticsearch-1.0.1.deb
> 
> The last step results in the following
> 
> (Reading database ... 57341 files and directories currently installed.)  
> Preparing to replace elasticsearch 1.0.1 (using elasticsearch-1.0.1.deb) ...  
> Unpacking replacement elasticsearch ...  
> Setting up elasticsearch (1.0.1) ...  
> chown: cannot access `/etc/elasticsearch/\*': No such file or directory
> 
> So I created /etc/elasticsearch with a dummy file in it and then did
> 
> sudo chmod 777 /etc/elasticsearch
> 
> Now when I run
> 
> sudo dpkg -i elasticsearch-1.0.1.deb
> 
> I get
> 
> (Reading database ... 57341 files and directories currently installed.)  
> Preparing to replace elasticsearch 1.0.1 (using elasticsearch-1.0.1.deb) ...  
> Unpacking replacement elasticsearch ...  
> Setting up elasticsearch (1.0.1) ...  
> Processing triggers for ureadahead ...
> 
> But nothing appears in /etc/elasticsearch
> 
> However I do get a folder appear in
> 
> /usr/share/elasticsearch
> 
> With the following contents
> 
> bin core-signatures.txt lib NOTICE.txt README.textile
> 
> From here if I run
> 
> sudo bin/elasticsearch
> 
> I get
> 
> log4j:WARN No appenders could be found for logger (node). log4j:WARN  
> Please initialize the log4j system properly. log4j:WARN See  
> [Apache log4j 1.2 - Frequently Asked Technical Questions](http://logging.apache.org/log4j/1.2/faq.html#noconfig) for more info.
> 
> And continues to run
> 
> If I open a new window and run
> 
> curl -XGET 'localhost:9200'
> 
> I get
> 
> {  
> "status" : 200,  
> "name" : "Volstagg",  
> "version" : {  
> "number" : "1.0.1",  
> "build\_hash" : "5c03844e1978e5cc924dab2a423dc63ce881c42b",  
> "build\_timestamp" : "2014-02-25T15:52:53Z",  
> "build\_snapshot" : false,  
> "lucene\_version" : "4.6"  
> },  
> "tagline" : "You Know, for Search"  
> }
> 
> So it appears to be running, and I can populate the search (symfony2  
> FOSElasticaBundle) with
> 
> php app/console fos:elastica:populate
> 
> But if I do a search no results are found.
> 
> There is nothing in /etc/elasticsearch apart from the dummy file I placed  
> in there.
> 
> I have found the configuration file at /etc/default/elasticsearch which is  
> all commented out at present.
> 
> The Symfony2 error I get when trying to search is: ERROR - Caught  
> exception: SearchPhaseExecutionException[Failed to execute phase [query],  
> all shards failed
> 
> So the question is please, has it installed or not and why isn't it  
> working properly?
> 
> Thanks
> 
> Patrick

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/78c07f48-8c8f-415f-abb4-0eb763641ea5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/78c07f48-8c8f-415f-abb4-0eb763641ea5%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [March 31, 2014, 7:30am UTC](https://discuss.elastic.co/t/install-elasticsearch-1-0-1-on-ubuntu-12-04-fails-with-sudo-dpkg-i-elasticsearch-1-0-1-deb/16561/4 "2014-03-31T07:30:29Z")

</div>

Hey,

if you create a file /etc/elasticsearch, then the debian package can not  
create a directory at the same position. Creating a directory instead might  
help (or remove everything with that name before the installation).  
Also, when you start elasticsearch, you should use the init script,  
otherwise logging is not configured appropriately (this is why you get the  
above error message).

I could not reproduce that error when installing elasticsearch 1.0.1 on a  
local ubuntu VM, is it possible you have somehow messed up your  
/etc/elasticsearch directory/file before?

--Alex

On Mon, Mar 24, 2014 at 10:53 AM, Patrick Lock [patrick.lock@gmail.com](mailto:patrick.lock@gmail.com)wrote:

> I am trying to install Elasticsearch 1.0.1 on Ubuntu 12.04. So far I have  
> done:
> 
> First I removed the old elasticsearch 0.90 package
> 
> sudo dpkg -r elasticsearch
> 
> Then
> 
> cd ~  
> sudo apt-get update  
> sudo apt-get install openjdk-7-jre-headless -y
> 
> wget [https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb](https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb)  
> sudo dpkg -i elasticsearch-1.0.1.deb
> 
> The last step results in the following
> 
> (Reading database ... 57341 files and directories currently installed.)  
> Preparing to replace elasticsearch 1.0.1 (using elasticsearch-1.0.1.deb) ...  
> Unpacking replacement elasticsearch ...  
> Setting up elasticsearch (1.0.1) ...  
> chown: cannot access `/etc/elasticsearch/\*': No such file or directory
> 
> So I created /etc/elasticsearch with a dummy file in it and then did
> 
> sudo chmod 777 /etc/elasticsearch
> 
> Now when I run
> 
> sudo dpkg -i elasticsearch-1.0.1.deb
> 
> I get
> 
> (Reading database ... 57341 files and directories currently installed.)  
> Preparing to replace elasticsearch 1.0.1 (using elasticsearch-1.0.1.deb) ...  
> Unpacking replacement elasticsearch ...  
> Setting up elasticsearch (1.0.1) ...  
> Processing triggers for ureadahead ...
> 
> But nothing appears in /etc/elasticsearch
> 
> However I do get a folder appear in
> 
> /usr/share/elasticsearch
> 
> With the following contents
> 
> bin core-signatures.txt lib NOTICE.txt README.textile
> 
> From here if I run
> 
> sudo bin/elasticsearch
> 
> I get
> 
> log4j:WARN No appenders could be found for logger (node). log4j:WARN  
> Please initialize the log4j system properly. log4j:WARN See  
> [Apache log4j 1.2 - Frequently Asked Technical Questions](http://logging.apache.org/log4j/1.2/faq.html#noconfig) for more info.
> 
> And continues to run
> 
> If I open a new window and run
> 
> curl -XGET 'localhost:9200'
> 
> I get
> 
> {  
> "status" : 200,  
> "name" : "Volstagg",  
> "version" : {  
> "number" : "1.0.1",  
> "build\_hash" : "5c03844e1978e5cc924dab2a423dc63ce881c42b",  
> "build\_timestamp" : "2014-02-25T15:52:53Z",  
> "build\_snapshot" : false,  
> "lucene\_version" : "4.6"  
> },  
> "tagline" : "You Know, for Search"  
> }
> 
> So it appears to be running, and I can populate the search (symfony2  
> FOSElasticaBundle) with
> 
> php app/console fos:elastica:populate
> 
> But if I do a search no results are found.
> 
> There is nothing in /etc/elasticsearch apart from the dummy file I placed  
> in there.
> 
> I have found the configuration file at /etc/default/elasticsearch which is  
> all commented out at present.
> 
> The Symfony2 error I get when trying to search is: ERROR - Caught  
> exception: SearchPhaseExecutionException[Failed to execute phase [query],  
> all shards failed
> 
> So the question is please, has it installed or not and why isn't it  
> working properly?
> 
> Thanks
> 
> Patrick
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/0dd824da-8c36-4954-9d3f-ffd037a36ab8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0dd824da-8c36-4954-9d3f-ffd037a36ab8%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/0dd824da-8c36-4954-9d3f-ffd037a36ab8%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/0dd824da-8c36-4954-9d3f-ffd037a36ab8%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM95jjtQoqiwi4eqsopyE4\_zNYmDD4uwVOk%2BiQZRdThR2Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM95jjtQoqiwi4eqsopyE4_zNYmDD4uwVOk%2BiQZRdThR2Q%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Patrick\_Lock](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@Patrick\_Lock](https://discuss.elastic.co/u/Patrick_Lock)
#### Post date: [March 31, 2014, 7:59am UTC](https://discuss.elastic.co/t/install-elasticsearch-1-0-1-on-ubuntu-12-04-fails-with-sudo-dpkg-i-elasticsearch-1-0-1-deb/16561/5 "2014-03-31T07:59:14Z")

</div>

Hi, the reason I had to create the /etc/elasticsearch directory with an  
empty file in it, is otherwise I would get a cannot create directory error  
(possibly permissions problem). It is quite possible that I have messed up  
the /etc/elasticsearch before, but I'm not sure how to rectify this  
problem. I have tried deleting the directory but that results in the cannot  
create directory error.

Cheers

On Monday, 31 March 2014 08:30:29 UTC+1, Alexander Reelsen wrote:

> Hey,
> 
> if you create a file /etc/elasticsearch, then the debian package can not  
> create a directory at the same position. Creating a directory instead might  
> help (or remove everything with that name before the installation).  
> Also, when you start elasticsearch, you should use the init script,  
> otherwise logging is not configured appropriately (this is why you get the  
> above error message).
> 
> I could not reproduce that error when installing elasticsearch 1.0.1 on a  
> local ubuntu VM, is it possible you have somehow messed up your  
> /etc/elasticsearch directory/file before?
> 
> --Alex
> 
> On Mon, Mar 24, 2014 at 10:53 AM, Patrick Lock \<[patric...@gmail.com](mailto:patric...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > I am trying to install Elasticsearch 1.0.1 on Ubuntu 12.04. So far I have  
> > done:
> > 
> > First I removed the old elasticsearch 0.90 package
> > 
> > sudo dpkg -r elasticsearch
> > 
> > Then
> > 
> > cd ~  
> > sudo apt-get update  
> > sudo apt-get install openjdk-7-jre-headless -y
> > 
> > wget [https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb](https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb)  
> > sudo dpkg -i elasticsearch-1.0.1.deb
> > 
> > The last step results in the following
> > 
> > (Reading database ... 57341 files and directories currently installed.)  
> > Preparing to replace elasticsearch 1.0.1 (using elasticsearch-1.0.1.deb) ...  
> > Unpacking replacement elasticsearch ...  
> > Setting up elasticsearch (1.0.1) ...  
> > chown: cannot access `/etc/elasticsearch/\*': No such file or directory
> > 
> > So I created /etc/elasticsearch with a dummy file in it and then did
> > 
> > sudo chmod 777 /etc/elasticsearch
> > 
> > Now when I run
> > 
> > sudo dpkg -i elasticsearch-1.0.1.deb
> > 
> > I get
> > 
> > (Reading database ... 57341 files and directories currently installed.)  
> > Preparing to replace elasticsearch 1.0.1 (using elasticsearch-1.0.1.deb) ...  
> > Unpacking replacement elasticsearch ...  
> > Setting up elasticsearch (1.0.1) ...  
> > Processing triggers for ureadahead ...
> > 
> > But nothing appears in /etc/elasticsearch
> > 
> > However I do get a folder appear in
> > 
> > /usr/share/elasticsearch
> > 
> > With the following contents
> > 
> > bin core-signatures.txt lib NOTICE.txt README.textile
> > 
> > From here if I run
> > 
> > sudo bin/elasticsearch
> > 
> > I get
> > 
> > log4j:WARN No appenders could be found for logger (node). log4j:WARN  
> > Please initialize the log4j system properly. log4j:WARN See  
> > [Apache log4j 1.2 - Frequently Asked Technical Questions](http://logging.apache.org/log4j/1.2/faq.html#noconfig) for more info.
> > 
> > And continues to run
> > 
> > If I open a new window and run
> > 
> > curl -XGET 'localhost:9200'
> > 
> > I get
> > 
> > {  
> > "status" : 200,  
> > "name" : "Volstagg",  
> > "version" : {  
> > "number" : "1.0.1",  
> > "build\_hash" : "5c03844e1978e5cc924dab2a423dc63ce881c42b",  
> > "build\_timestamp" : "2014-02-25T15:52:53Z",  
> > "build\_snapshot" : false,  
> > "lucene\_version" : "4.6"  
> > },  
> > "tagline" : "You Know, for Search"  
> > }
> > 
> > So it appears to be running, and I can populate the search (symfony2  
> > FOSElasticaBundle) with
> > 
> > php app/console fos:elastica:populate
> > 
> > But if I do a search no results are found.
> > 
> > There is nothing in /etc/elasticsearch apart from the dummy file I placed  
> > in there.
> > 
> > I have found the configuration file at /etc/default/elasticsearch which  
> > is all commented out at present.
> > 
> > The Symfony2 error I get when trying to search is: ERROR - Caught  
> > exception: SearchPhaseExecutionException[Failed to execute phase [query],  
> > all shards failed
> > 
> > So the question is please, has it installed or not and why isn't it  
> > working properly?
> > 
> > Thanks
> > 
> > Patrick
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/0dd824da-8c36-4954-9d3f-ffd037a36ab8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0dd824da-8c36-4954-9d3f-ffd037a36ab8%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/0dd824da-8c36-4954-9d3f-ffd037a36ab8%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/0dd824da-8c36-4954-9d3f-ffd037a36ab8%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6b055e07-7b28-4a7b-b61c-2e12ea62541d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6b055e07-7b28-4a7b-b61c-2e12ea62541d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [March 31, 2014, 8:15am UTC](https://discuss.elastic.co/t/install-elasticsearch-1-0-1-on-ubuntu-12-04-fails-with-sudo-dpkg-i-elasticsearch-1-0-1-deb/16561/6 "2014-03-31T08:15:13Z")

</div>

Hey,

note that dpkg -r does not remove config files, so it might be that the  
file/directory was already there with wrong permissions (otherwise I would  
have seen that error on my local ubuntu as well I guess)? If you want to  
make sure that all old config data is removed, you need to call dpkg -P

I'd be very happy if you could reproduce it reliably so I can take a  
further look.

--Alex

On Mon, Mar 31, 2014 at 9:59 AM, Patrick Lock [patrick.lock@gmail.com](mailto:patrick.lock@gmail.com)wrote:

> Hi, the reason I had to create the /etc/elasticsearch directory with an  
> empty file in it, is otherwise I would get a cannot create directory error  
> (possibly permissions problem). It is quite possible that I have messed up  
> the /etc/elasticsearch before, but I'm not sure how to rectify this  
> problem. I have tried deleting the directory but that results in the cannot  
> create directory error.
> 
> Cheers
> 
> On Monday, 31 March 2014 08:30:29 UTC+1, Alexander Reelsen wrote:
> 
> > Hey,
> > 
> > if you create a file /etc/elasticsearch, then the debian package can not  
> > create a directory at the same position. Creating a directory instead might  
> > help (or remove everything with that name before the installation).  
> > Also, when you start elasticsearch, you should use the init script,  
> > otherwise logging is not configured appropriately (this is why you get the  
> > above error message).
> > 
> > I could not reproduce that error when installing elasticsearch 1.0.1 on a  
> > local ubuntu VM, is it possible you have somehow messed up your  
> > /etc/elasticsearch directory/file before?
> > 
> > --Alex
> > 
> > On Mon, Mar 24, 2014 at 10:53 AM, Patrick Lock [patric...@gmail.com](mailto:patric...@gmail.com)wrote:
> > 
> > > I am trying to install Elasticsearch 1.0.1 on Ubuntu 12.04. So far I  
> > > have done:
> > > 
> > > First I removed the old elasticsearch 0.90 package
> > > 
> > > sudo dpkg -r elasticsearch
> > > 
> > > Then
> > > 
> > > cd ~  
> > > sudo apt-get update  
> > > sudo apt-get install openjdk-7-jre-headless -y
> > > 
> > > wget [https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb](https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb)  
> > > sudo dpkg -i elasticsearch-1.0.1.deb
> > > 
> > > The last step results in the following
> > > 
> > > (Reading database ... 57341 files and directories currently installed.)  
> > > Preparing to replace elasticsearch 1.0.1 (using elasticsearch-1.0.1.deb) ...  
> > > Unpacking replacement elasticsearch ...  
> > > Setting up elasticsearch (1.0.1) ...  
> > > chown: cannot access `/etc/elasticsearch/\*': No such file or directory
> > > 
> > > So I created /etc/elasticsearch with a dummy file in it and then did
> > > 
> > > sudo chmod 777 /etc/elasticsearch
> > > 
> > > Now when I run
> > > 
> > > sudo dpkg -i elasticsearch-1.0.1.deb
> > > 
> > > I get
> > > 
> > > (Reading database ... 57341 files and directories currently installed.)  
> > > Preparing to replace elasticsearch 1.0.1 (using elasticsearch-1.0.1.deb) ...  
> > > Unpacking replacement elasticsearch ...  
> > > Setting up elasticsearch (1.0.1) ...  
> > > Processing triggers for ureadahead ...
> > > 
> > > But nothing appears in /etc/elasticsearch
> > > 
> > > However I do get a folder appear in
> > > 
> > > /usr/share/elasticsearch
> > > 
> > > With the following contents
> > > 
> > > bin core-signatures.txt lib NOTICE.txt README.textile
> > > 
> > > From here if I run
> > > 
> > > sudo bin/elasticsearch
> > > 
> > > I get
> > > 
> > > log4j:WARN No appenders could be found for logger (node). log4j:WARN  
> > > Please initialize the log4j system properly. log4j:WARN See  
> > > [Apache log4j 1.2 - Frequently Asked Technical Questions](http://logging.apache.org/log4j/1.2/faq.html#noconfig) for more info.
> > > 
> > > And continues to run
> > > 
> > > If I open a new window and run
> > > 
> > > curl -XGET 'localhost:9200'
> > > 
> > > I get
> > > 
> > > {  
> > > "status" : 200,  
> > > "name" : "Volstagg",  
> > > "version" : {  
> > > "number" : "1.0.1",  
> > > "build\_hash" : "5c03844e1978e5cc924dab2a423dc63ce881c42b",  
> > > "build\_timestamp" : "2014-02-25T15:52:53Z",  
> > > "build\_snapshot" : false,  
> > > "lucene\_version" : "4.6"  
> > > },  
> > > "tagline" : "You Know, for Search"  
> > > }
> > > 
> > > So it appears to be running, and I can populate the search (symfony2  
> > > FOSElasticaBundle) with
> > > 
> > > php app/console fos:elastica:populate
> > > 
> > > But if I do a search no results are found.
> > > 
> > > There is nothing in /etc/elasticsearch apart from the dummy file I  
> > > placed in there.
> > > 
> > > I have found the configuration file at /etc/default/elasticsearch which  
> > > is all commented out at present.
> > > 
> > > The Symfony2 error I get when trying to search is: ERROR - Caught  
> > > exception: SearchPhaseExecutionException[Failed to execute phase  
> > > [query], all shards failed
> > > 
> > > So the question is please, has it installed or not and why isn't it  
> > > working properly?
> > > 
> > > Thanks
> > > 
> > > Patrick
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).
> > > 
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/0dd824da-8c36-4954-9d3f-ffd037a36ab8%  
> > > [40googlegroups.com](http://40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/0dd824da-8c36-4954-9d3f-ffd037a36ab8%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/0dd824da-8c36-4954-9d3f-ffd037a36ab8%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/6b055e07-7b28-4a7b-b61c-2e12ea62541d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6b055e07-7b28-4a7b-b61c-2e12ea62541d%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/6b055e07-7b28-4a7b-b61c-2e12ea62541d%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6b055e07-7b28-4a7b-b61c-2e12ea62541d%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM9%3Dj\_LPJXgfmYU%3DLc-Hg4ygOEEvm7hbR7YjhWd-j8Gsjg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM9%3Dj_LPJXgfmYU%3DLc-Hg4ygOEEvm7hbR7YjhWd-j8Gsjg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 1:39am UTC](https://discuss.elastic.co/t/install-elasticsearch-1-0-1-on-ubuntu-12-04-fails-with-sudo-dpkg-i-elasticsearch-1-0-1-deb/16561/7 "2017-07-06T01:39:28Z")

</div>


