package install issue for "do-agent"

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

The following NEW packages will be installed:
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 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:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I opened a ticket with Digital Ocean and this was the fix for me:

Are you by chance using Ubuntu 14.04 on the Droplet having issues?

The reason for that particular error has to do with Ubuntu 14.04 that is now end of life (EOL). The issue is known by Ubuntu, but is unlikely to get major attention due to it being EOL.

In order to workaround the issue, you will need to update “/etc/apt/sources.list.d/digitalocean-agent.list” manually to use http instead of https as follows:

sed -i ‘s/https/http/g’ /etc/apt/sources.list.d/digitalocean-agent.list sudo apt-get update sudo apt-get install do-agent

I encounter HTTPError 403 even I changed from https to http. I turn out solved this problem by install do-agent from the github source.

Thanks @luxio, I’m using sysvinit.