Installing Grafana on Ubuntu 16.04

Hello folks,

I have installed Grafana on Linux Mint several months ago and the installation went without any problems. Now I need to install it on Ubuntu Linux 16.04.3 LTS (x86_64) on an Azure cloud virtual machine and I just can’t. :frowning:

I am following this guide. I added the PGP key and the repository source, as instructed, but when I do sudo apt-get install grafana, I get the following error:

Preparing to unpack .../grafana_4.6.1_amd64.deb ...
Unpacking grafana (4.6.1) ...
dpkg: error processing archive /var/cache/apt/archives/grafana_4.6.1_amd64.deb (--unpack):
 trying to overwrite '/usr/share/grafana/conf/defaults.ini', which is also in package grafana-data 2.6.0+dfsg-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for systemd (229-4ubuntu21) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

What does this mean and how to fix it? Is the archive corrupted or something? Can’t I install this version of Grafana on this Linux distribution?

You seem to have an unofficial grafana 2.6 package installed

I removed that (with apt-get remove) but the error persists. Any suggestions what to do?

Never mind. I had removed grafana - but there was this (obviously separate) package grafana-data. Once I removed that one too, the latest version installed without problems. Thanks for your help!

I also have same issue, removed grafana-data with apt-get purge, but it still installed 2.6 afterwards, any other things you did to get this to work?

I also did a complete re-install of linux from scratch, avoiding the “bad” 2.6 and it still installed 2.6 when I followed the instructions exactly…

I have now solved this. I didn’t realise that with Pi you have to install a different way, ie by downloading the .deb and manually installing. Also wasn’t clear that the arm version was arm7, as I believe pi3 is arm64. All solved for now.

Thank you, it was very helpful. I upgraded on a Pine64 and it worked fine doing the removals you suggested. Cheers.