Error Installing CFEngine 3 on Ubuntu 12.04

I was trying to install CFEngine3 using the following commands:

wget http://cfengine.com/pub/gpg.key
apt-key add gpg.key
rm gpg.key
add-apt-repository http://cfengine.com/pub/apt
apt-get update
apt-get install cfengine-community

However, I got the following error:

Failed to fetch http://cfengine.com/pub/apt/dists/precise/Release Unable to find expected entry ‘main/source/Sources’ in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.

Apparently this is an open bug. Thankfully, there is an easy work-around. Simply edit /etc/apt/sources.list and comment out the following line (by adding a “#”):

deb-src http://cfengine.com/pub/apt precise main

You can still install the binary packages without the src repository.

This entry was posted in Linux, Networking, System Administration and tagged , , , . Bookmark the permalink.

2 Responses to Error Installing CFEngine 3 on Ubuntu 12.04

  1. Hi Daniel

    CFEngine does not (yet) provide debsrc packages and that bug in add-apt-repository causes it to complain.

    The instructions on CFEngines website no longer include add-apt-repository for that reason :)
    http://cfengine.com/cfengine-linux-distros

    • daniel says:

      Good point. I was using the book CFEngine 3 which didn’t include that difference. On another note, I have been quite impressed by the software; it’s a pretty neat piece of code. Keep up the good work.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>