Ubuntu repo not working [Solved]


(Dore Mon) #1

TL;DR

The deb file available on download page work for both i686 and x64 BUT the package in the repo is only available for x64. This was the confusion which triggered this thread.

Hi,

I did included the elasticsearch repo in my sources.list file and ran an apt-get update but it doesn't get any list of packages from that repo.

/etc/apt/sources.list

root@ubuntu:~# tail /etc/apt/sources.list
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main
deb http://packages.elastic.co/elasticsearch/2.x/debian stable main

apt-get update doesn't throw any error

root@ubuntu:~# apt-get update | grep elastic
Ign http://packages.elastic.co stable InRelease
Hit http://packages.elastic.co stable Release.gpg
Hit http://packages.elastic.co stable Release
Hit http://packages.elastic.co stable/main i386 Packages
Ign http://packages.elastic.co stable/main Translation-en_US
Ign http://packages.elastic.co stable/main Translation-en

Trying to install logstash, elasticsearch or kibana doesn't work.

ubuntu@ubuntu:~$ sudo apt-get install logstash
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package logstash
ubuntu@ubuntu:~$ sudo apt-get install kibana
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package kibana
ubuntu@ubuntu:~$ 

any clue why?

UPDATE: Earlier I misunderstood that logstash,kibana and elasticsearch uses the same repo. I also had installed elasticsearch from deb package manually so I posted the attempts of installing kibana and logstash above because apt-get install elasticsearch wasn't producing the error instead claiming that it's already installed. Later I did removed the package and have shared the output error in 3rd reply below.


(Magnus Bäck) #2

You only added the ES repository. To install Logstash and Kibana you need to add those repositories.

https://www.elastic.co/guide/en/kibana/current/setup.html
https://www.elastic.co/guide/en/logstash/current/package-repositories.html


(Dore Mon) #3

Sorry for the confusion. I actually had installed ES from deb manually so wasn't able to re-produce the error for ES package.

It doesn't have elasticsearch also

root@ubuntu:~# apt-get install elasticsearch
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package elasticsearch is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'elasticsearch' has no installation candidate

(Mark Walkom) #4

What does apt-cache show elasticsearch give you?


(Dore Mon) #5
> root@ubuntu:~# apt-cache show elasticsearch
> Package: elasticsearch
> Status: deinstall ok config-files
> Priority: optional
> Section: web
> Installed-Size: 32069
> Maintainer: Elasticsearch Team <info@elastic.co>
> Architecture: all
> Version: 2.2.0
> Config-Version: 2.2.0
> Depends: libc6, adduser
> Conffiles:
>  /etc/default/elasticsearch f1d48813644c5cf6fd516b04faee91ac
>  /etc/elasticsearch/elasticsearch.yml dfcf42a2e9538d3f7fd13e74eb06a5fa
>  /etc/elasticsearch/logging.yml cefdfff5b2d39ba0859898c66767da63
>  /etc/init.d/elasticsearch 85c444de19040a28d62a343fbe3292b7
>  /usr/lib/systemd/system/elasticsearch.service 7d341c1dd69e9543afa0aec072e65207
> Description: Elasticsearch is a distributed RESTful search engine built for the cloud. Reference documentation can be found at https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html and the 'Elasticsearch: The Definitive Guide' book can be found at https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html
> Description-md5: 7a174b4a3b09460a7e934d813a44dbc0
> Homepage: https://www.elastic.co/

(Mark Walkom) #6

So it is there in the repo, otherwise that wouldn't return anything.


(Dore Mon) #7

so any clue why it's not installing it from the repo? It's a fresh install of Ubuntu 14.


(Mark Walkom) #8

You'd need to post the output from apt-get install elasticsearch for us to say why.


(Dore Mon) #9

I already replied above

https://discuss.elastic.co/t/ubuntu-repo-not-working/43043/3?u=doremon


(Mark Walkom) #10

Except there you only tried to install Kibana and Logstash with the wrong repo, I cannot see you attempting to install Elasticsearch at all.


(Dore Mon) #11

@warkolm I'm sorry for the confusion. If you pay attention I shared linked to the reply I already made. It's the 3rd reply. You can scroll up or see the enclosed quote.


(Dore Mon) #12

Ubuntu's default repos and Logstash repo all others are working fine. I was able to install logstash from it's repo. Elastic's repo is also getting resolved properly.

root@ubuntu:~# nslookup packages.elastic.co
Server:		127.0.1.1
Address:	127.0.1.1#53

Non-authoritative answer:
packages.ELASTIC.co	canonical name = dualstack.download-colb-770446651.us-east-1.elb.amazonaws.com.
Name:	dualstack.download-colb-770446651.us-east-1.elb.amazonaws.com
Address: 23.23.87.160
Name:	dualstack.download-colb-770446651.us-east-1.elb.amazonaws.com
Address: 50.16.239.78
Name:	dualstack.download-colb-770446651.us-east-1.elb.amazonaws.com
Address: 50.19.210.5

(Dore Mon) #13

I also tried re-uilding the apt-cache

root@ubuntu:~# apt-get autoclean
Reading package lists... Done
Building dependency tree       
Reading state information... Done
root@ubuntu:~# apt-get clean all
root@ubuntu:~# apt-get update
.....
.....
Ign http://packages.elastic.co stable InRelease
Ign http://packages.elastic.co stable InRelease
Hit http://packages.elastic.co stable Release.gpg
Hit http://packages.elastic.co stable Release.gpg
Hit http://packages.elastic.co stable Release
Hit http://packages.elastic.co stable Release
Hit http://packages.elastic.co stable/main i386 Packages
Hit http://packages.elastic.co stable/main i386 Packages
Ign http://packages.elastic.co stable/main Translation-en_US
Ign http://packages.elastic.co stable/main Translation-en
Ign http://packages.elastic.co stable/main Translation-en_US
Ign http://packages.elastic.co stable/main Translation-en
...
...
Fetched 752 kB in 15s (47.8 kB/s)                                              
Reading package lists... Done
root@ubuntu:~# 
root@ubuntu:~# apt-get install elasticsearch
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package elasticsearch is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'elasticsearch' has no installation candidate
root@ubuntu:~#

(Dore Mon) #14

There is an update.

There were some remains of manual deb installation. Purging the deb completely has impact on the previosu results I've posted above.

Now it looks like the following

root@ubuntu:~# apt-cache show elasticsearch
N: Unable to locate package elasticsearch
E: No packages found
root@ubuntu:~# apt-get install elasticsearch
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package elasticsearch

@warkolm apt-cache also doesn't show anything this time.


(Mark Walkom) #15

This is a fresh 14.04 VM;

# wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
OK
# echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
deb http://packages.elastic.co/elasticsearch/2.x/debian stable main
# apt-get update
Ign http://packages.elastic.co stable InRelease
Get:1 http://packages.elastic.co stable Release.gpg [473 B]
Get:2 http://packages.elastic.co stable Release [1,234 B]
Get:3 http://packages.elastic.co stable/main amd64 Packages [1,498 B]
Ign http://archive.ubuntu.com trusty InRelease
Get:4 http://archive.ubuntu.com trusty-updates InRelease [65.9 kB]
Get:5 http://security.ubuntu.com trusty-security InRelease [65.9 kB]
Get:6 http://archive.ubuntu.com trusty-backports InRelease [65.9 kB]
Get:7 http://security.ubuntu.com trusty-security/main Sources [105 kB]
Hit http://archive.ubuntu.com trusty Release.gpg
Get:8 http://archive.ubuntu.com trusty-updates/main Sources [260 kB]
Ign http://packages.elastic.co stable/main Translation-en_US
Ign http://packages.elastic.co stable/main Translation-en
< BIG SNIP>
Fetched 11.0 MB in 46s (238 kB/s)
Reading package lists... Done
# apt-get install elasticsearch
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  elasticsearch
0 upgraded, 1 newly installed, 0 to remove and 78 not upgraded.
Need to get 29.3 MB of archives.
After this operation, 32.8 MB of additional disk space will be used.
Get:1 http://packages.elastic.co/elasticsearch/2.x/debian/ stable/main elasticsearch all 2.2.0 [29.3 MB]
Fetched 29.3 MB in 52s (562 kB/s)
Selecting previously unselected package elasticsearch.
(Reading database ... 62972 files and directories currently installed.)
Preparing to unpack .../elasticsearch_2.2.0_all.deb ...
Creating elasticsearch group... OK
Creating elasticsearch user... OK
Unpacking elasticsearch (2.2.0) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up elasticsearch (2.2.0) ...
Processing triggers for ureadahead (0.100.0-16) ...
#

(Dore Mon) #16

Wait a minute... does this repo have only packages for x64?


(Mark Walkom) #17

Yes, we don't do 32 bit ES.


(Dore Mon) #18

@warkolm Can you confirm if the package in repo is only for x64 in contrast to the deb available on download page which work for both i686 and x64?


(Dore Mon) #19

@warkolm Thanks for your support mate!


(Mark Walkom) #20

NP, I have asked those that look after the repo what the go is here!