How to upgrade Influxdb 0.10.0 to 1.2.2 in Ubuntu 16.04
First, you need to remove the old version:
sudo apt-get remove influxdb influxdb-client
Now, to install the newest version you can do it throught a .deb file or from the repositories:
From .deb file:
wget https://dl.influxdata.com/influxdb/releases/influxdb_1.2.2_amd64.deb
sudo dpkg -i influxdb_1.2.2_amd64.deb
From repositories:
curl -sL https://repos.influxdata.com/influxdb.key | apt-key add -
source /etc/lsb-release
echo "deb https://repos.influxdata.com/ubuntu xenial stable" | tee -a /etc/apt/sources.list
apt-get update
apt-get install influxdb
In both cases the following message may appear:
Preparing to unpack .../influxdb_1.2.1-1_amd64.deb ...
Unpacking influxdb (1.2.1-1) over (0.10.0+dfsg1-1) ...
dpkg: error processing archive /var/cache/apt/archives/influxdb_1.2.1-1_amd64.deb (--unpack):
trying to overwrite '/usr/bin/influx', which is also in package influxdb-client 0.10.0+dfsg1-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
influxdb.service is not a native service, redirecting to systemd-sysv-install
Executing /lib/systemd/systemd-sysv-install disable influxdb
insserv: warning: current start runlevel(s) (empty) of script `influxdb' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `influxdb' overrides LSB defaults (0 1 6).
insserv: warning: current start runlevel(s) (empty) of script `influxdb' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `influxdb' overrides LSB defaults (0 1 6).
/usr/bin/deb-systemd-helper: error: unable to read influxdb.service
insserv: warning: current start runlevel(s) (empty) of script `influxdb' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `influxdb' overrides LSB defaults (0 1 6).
Errors were encountered while processing:
/var/cache/apt/archives/influxdb_1.2.1-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
This means that an influxdb process is still running on your computer.
If you try to run influxdb this message will appear:
Failed to start influxdb.service: Unit influxdb.service is masked.
To unmask this service, just use this command:
sudo systemctl unmask influxdb.service
Now, try the installation again
Enjoy it!
sudo apt-get remove influxdb influxdb-client
Now, to install the newest version you can do it throught a .deb file or from the repositories:
From .deb file:
wget https://dl.influxdata.com/influxdb/releases/influxdb_1.2.2_amd64.deb
sudo dpkg -i influxdb_1.2.2_amd64.deb
From repositories:
curl -sL https://repos.influxdata.com/influxdb.key | apt-key add -
source /etc/lsb-release
echo "deb https://repos.influxdata.com/ubuntu xenial stable" | tee -a /etc/apt/sources.list
apt-get update
apt-get install influxdb
In both cases the following message may appear:
Preparing to unpack .../influxdb_1.2.1-1_amd64.deb ...
Unpacking influxdb (1.2.1-1) over (0.10.0+dfsg1-1) ...
dpkg: error processing archive /var/cache/apt/archives/influxdb_1.2.1-1_amd64.deb (--unpack):
trying to overwrite '/usr/bin/influx', which is also in package influxdb-client 0.10.0+dfsg1-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
influxdb.service is not a native service, redirecting to systemd-sysv-install
Executing /lib/systemd/systemd-sysv-install disable influxdb
insserv: warning: current start runlevel(s) (empty) of script `influxdb' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `influxdb' overrides LSB defaults (0 1 6).
insserv: warning: current start runlevel(s) (empty) of script `influxdb' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `influxdb' overrides LSB defaults (0 1 6).
/usr/bin/deb-systemd-helper: error: unable to read influxdb.service
insserv: warning: current start runlevel(s) (empty) of script `influxdb' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `influxdb' overrides LSB defaults (0 1 6).
Errors were encountered while processing:
/var/cache/apt/archives/influxdb_1.2.1-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
This means that an influxdb process is still running on your computer.
If you try to run influxdb this message will appear:
Failed to start influxdb.service: Unit influxdb.service is masked.
To unmask this service, just use this command:
sudo systemctl unmask influxdb.service
Now, try the installation again
Enjoy it!
Thankyou, this worked for me.
ReplyDelete