Hi,
I am trying to set up couchbase server by following - https://developer.couchbase.com/documentation/server/4.1/install/ubuntu-apt.html
in AWS server. In one server I was able to install but in 2nd server I am getting following error:
sudo apt-get install couchbase-server
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package couchbase-server
Version of OS in 1st server
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Version of OS in 2nd server
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
avsej
September 25, 2017, 10:31am
2
Did you execute sudo apt-get update
? Could you post its output here?
Yes. I already tried that.
avsej
September 25, 2017, 12:19pm
4
And what was the output of the command?
avsej
September 25, 2017, 12:36pm
6
Could you make sure you follow instructions in the official documentation?
https://developer.couchbase.com/documentation/server/current/install/ubuntu-debian-install.html#story-h2-2
I don’t see it is loading from http://packages.couchbase.com/releases/couchbase-server/community/deb/
, are you sure you use amd64 platform?
Yes,
I have tried this as well.
PFB the output
uname -m
x86_64
root@ip-172-31-18-16:~# curl -O http://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-3-amd64.deb
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3582 100 3582 0 0 6953 0 --:–:-- --:–:-- --:–:-- 6955
root@ip-172-31-18-16:~#
root@ip-172-31-18-16:~# sudo dpkg -i couchbase-release-1.0-3-amd64.deb
(Reading database … 201078 files and directories currently installed.)
Preparing to unpack couchbase-release-1.0-3-amd64.deb …
Unpacking couchbase-release (1.0-3) over (1.0-3) …
Setting up couchbase-release (1.0-3) …
gpg: key CD406E62: “Couchbase Release Key (RPM) support@couchbase.com ” not changed
gpg: key D9223EDA: “Couchbase Release Key support@couchbase.com ” not changed
gpg: Total number processed: 2
gpg: unchanged: 2
OK
root@ip-172-31-18-16:~# sudo apt-get update
Hit:1 http://us-west-1.ec2.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://us-west-1.ec2.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:3 http://us-west-1.ec2.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Hit:4 http://packages.couchbase.com/ubuntu xenial InRelease
Get:5 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:6 http://ppa.launchpad.net/certbot/certbot/ubuntu xenial InRelease
Get:7 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease [17.5 kB]
Get:8 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main amd64 Packages [2,900 B]
Fetched 327 kB in 1s (323 kB/s)
Reading package lists… Done
root@ip-172-31-18-16:~# sudo apt-get install couchbase-server-community
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package couchbase-server-community
`
avsej
September 25, 2017, 1:12pm
8
Could you show contents of /etc/apt/sources.list.d/couchbase.list
?
vi couchbase.list
deb http://packages.couchbase.com/ubuntu xenial xenial/main
avsej
September 25, 2017, 1:23pm
10
but http://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-3-amd64.deb
contains different list, it uses the following template when generating the list of repositories, so you should have three lines
deb [ arch=amd64 ] http://packages.couchbase.com/releases/couchbase-server/enterprise/deb/ %DCODE_SERVER% %DCODE_SERVER%/main
deb [ arch=amd64 ] http://packages.couchbase.com/releases/couchbase-server/community/deb/ %DCODE_SERVER% %DCODE_SERVER%/main
deb http://packages.couchbase.com/ubuntu %DCODE_SDK% %DCODE_SDK%/main
Could you reinstall couchbase-release
package?
avsej:
/etc/apt/sources.list.d/
In my other server in which I was able to install successfully, there also I have only one line:
vi couchbase.list
deb http://packages.couchbase.com/ubuntu xenial xenial/main
Tried re-installation as well, same problem
sudo dpkg -i couchbase-release-1.0-3-amd64.deb
(Reading database … 218611 files and directories currently installed.)
Preparing to unpack couchbase-release-1.0-3-amd64.deb …
Unpacking couchbase-release (1.0-3) over (1.0-3) …
Setting up couchbase-release (1.0-3) …
gpg: key CD406E62: “Couchbase Release Key (RPM) support@couchbase.com ” not changed
gpg: key D9223EDA: “Couchbase Release Key support@couchbase.com ” not changed
gpg: Total number processed: 2
gpg: unchanged: 2
OK
root@ip-172-31-18-16:~# sudo apt-get update
Hit:1 http://us-west-1.ec2.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://us-west-1.ec2.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://us-west-1.ec2.archive.ubuntu.com/ubuntu xenial-backports InRelease
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:5 http://packages.couchbase.com/ubuntu xenial InRelease
Hit:6 http://ppa.launchpad.net/certbot/certbot/ubuntu xenial InRelease
Hit:7 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial InRelease
Hit:8 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
Fetched 102 kB in 0s (116 kB/s)
Reading package lists… Done
root@ip-172-31-18-16:~# sudo apt-get install couchbase-server-community
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package couchbase-server-community
avsej
September 25, 2017, 1:37pm
13
I think that the answer is simple:
#!/bin/bash
gpg --import /etc/apt/trusted.gpg.d/GPG-KEY-COUCHBASE-1.0
apt-key add /etc/apt/trusted.gpg.d/GPG-KEY-COUCHBASE-1.0
repl=`lsb_release -c | awk '{print $2}'`
if [ "$repl" = "precise" -o "$repl" = "trusty" -o "$repl" = "lucid" -o "$repl" = "wheezy" -o "$repl" = "jessie" ]; then
sed -e "s/%DCODE_SERVER%/$repl/g" -i /etc/apt/sources.list.d/couchbase.list
sed -e "s/%DCODE_SDK%/$repl/g" -i /etc/apt/sources.list.d/couchbase.list
elif [ "$repl" = "xenial" ]; then
sed -e "/%DCODE_SERVER%/d" -i /etc/apt/sources.list.d/couchbase.list
sed -e "s/%DCODE_SDK%/$repl/g" -i /etc/apt/sources.list.d/couchbase.list
fi
This is postinst
script, and as you can see it removes server-related repositories on Ubuntu Xenial.
What version of Couchbase are you trying to install? Couchbase 4.6.3 does not support Ubuntu Xenial, you should use Trusty
I guess I have missed this. Can you please help me with the command to check the Couchbase version.?
avsej
September 25, 2017, 1:44pm
15
You can see supported platforms in Download section on the site: https://www.couchbase.com/downloads
I am using Ubuntu 16.04 which is not supported. In both the server the version is 16.04 but I can run in one server and not in other.
Both the servers have exact configuration.
avsej
September 25, 2017, 1:49pm
17
Does it work on Ubuntu Trusty 14.04.5? It should work there, as it is in list of supported platforms.