c0psrul3
By:
c0psrul3

package install issue for "do-agent"

January 17, 2017 426 views
DigitalOcean Debian

received error while installing 'do-agent' package via wget-bash script:

The following NEW packages will be installed:
  do-agent
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,538 kB of archives.
After this operation, 7,827 kB of additional disk space will be used.
Get:1 https://repos.sonar.digitalocean.com/apt/ main/main do-agent amd64 0.4.6 [2,538 kB]
Fetched 2,538 kB in 0s (10.3 MB/s)
Selecting previously unselected package do-agent.
(Reading database ... 94352 files and directories currently installed.)
Preparing to unpack .../do-agent_0.4.6_amd64.deb ...
Unpacking do-agent (0.4.6) ...
Setting up do-agent (0.4.6) ...
do-agent: unrecognized service
dpkg: error processing package do-agent (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 do-agent
E: Sub-process /usr/bin/dpkg returned an error code (1)
[mike@hostnumber1:~]$ 
3 Answers

Hmm, as far as I know, it should work correctly on Debian.

Make sure you're running it on supported distro. Supported distros are Ubuntu 14.04 and higher, CentOS 6 and higher and Debian 8. Script should warn you if you install on unsupported distro, but just to check.

Looks like the problem is that it can't find do-agent service.
Did you ever before installed Monitoring (do-agent) and removed it?
I remember problem that in early beta that if you installed it, then removed and tried to install again it could show similar service errors.

You can try completely removing it using purge option and trying script again:

  • sudo apt-get purge do-agent

Graphs are still in beta so things like this can happen. Also, you can contact support to report this problem and get help around it.

@c0psrul3

Have you tried running sudo apt-get update first? If package repositories are out of sync, installations may fail. So we'd run:

sudo apt-get update \
&& sudo apt-get -y install do-agent

yes, all package sources were updated first.
is Debian8 "jessie".

I've tried purging the agent, then re-installing:

Ign http://ftp.us.debian.org jessie InRelease
Hit http://ftp.us.debian.org jessie-updates InRelease                    
Hit http://security.debian.org jessie/updates InRelease                  
Hit http://ftp.us.debian.org jessie Release.gpg                             
Hit http://ftp.us.debian.org jessie Release                                 
Hit https://repos.sonar.digitalocean.com main InRelease                                      
...
Get:12 https://repos.sonar.digitalocean.com main/main Translation-en   
Ign https://repos.sonar.digitalocean.com main/main Translation-en   
Ign http://debmon.org debmon-jessie/main Translation-en_US          
Ign http://debmon.org debmon-jessie/main Translation-en
Fetched 9,620 B in 2s (4,420 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
apt-transport-https is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1760  100  1760    0     0  73089      0 --:--:-- --:--:-- --:--:-- 76521
OK
Ign http://ftp.us.debian.org jessie InRelease
Hit http://security.debian.org jessie/updates InRelease                  
Hit http://ftp.us.debian.org jessie-updates InRelease                        
Hit http://ftp.us.debian.org jessie Release.gpg                                                   
Hit http://security.debian.org jessie/updates/main Sources                                        
...
Fetched 9,620 B in 2s (4,514 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  do-agent
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/2,538 kB of archives.
After this operation, 7,827 kB of additional disk space will be used.
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Selecting previously unselected package do-agent.
(Reading database ... 95747 files and directories currently installed.)
Preparing to unpack .../do-agent_0.4.6_amd64.deb ...
Unpacking do-agent (0.4.6) ...
Setting up do-agent (0.4.6) ...
do-agent: unrecognized service
dpkg: error processing package do-agent (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 do-agent
E: Sub-process /usr/bin/dpkg returned an error code (1)
[mike@mahost:~]$ echo `!!`
echo `sudo bash DigitalOcean_Graphs_beta__install.sh`

After purge:

[mike@mahost:~]$ sudo apt update && sudo apt upgrade
Get:12 https://repos.sonar.digitalocean.com main/main Translation-en   
Ign https://repos.sonar.digitalocean.com main/main Translation-en   
Ign http://debmon.org debmon-jessie/main Translation-en_US          
Ign http://debmon.org debmon-jessie/main Translation-en
Fetched 9,620 B in 2s (4,395 B/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Please note, i'm just testing this out wanted to look at the 'do-agent' - beta the monitoring.
But i've got no success thus far.

Have another answer? Share your knowledge.