I want to install Puppet 4.2 on a Ubuntu 14.04 Trusty and when installing puppetserver through apt-get I get the following error near the end of the installation:
dpkg: error processing archive /var/cache/apt/archives/puppet-agent_1.2.2-1trusty_amd64.deb (--unpack):
error setting ownership of `/etc/puppetlabs/code/environments/production/hieradata.dpkg-new': Operation not permitted
Afterwards when checking the service status it is listed as "puppetserver.dpkg-new" instead of simply puppetserver.
What's the problem? I run the apt-get with sudo.