Elasticsearch: Defective deb package for 1.6.0

Created on 11 Jul 2015  路  7Comments  路  Source: elastic/elasticsearch

Nice deb package:

# apt-get install elasticsearch
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
elasticsearch
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/27.2 MB of archives.
After this operation, 31.2 MB of additional disk space will be used.
dpkg: unrecoverable fatal error, aborting:
unknown user 'elasticsearch' in statoverride file
E: Sub-process /usr/bin/dpkg returned an error code (2)

ls -altr /var/cache/apt/archives/ | grep -i elast
-rw-r--r-- 1 root root 27225316 Jun 9 13:51 elasticsearch_1.6.0_all.deb

:DeliverPackaging Delivery feedback_needed

Most helpful comment

'statoverride' is /var/lib/dpkg/statoverride.
dpkg (and apt) will throw this error when

  1. a user is created by a package installer
  2. the user is deleted via the CLI
  3. another dpkg (or apt) install/update is run

The second step removes the user from /etc/password, but not from /var/lib/dpkg/statoverride.
dpkg doesn't like that arrangement.
One fix seems to be doing an apt-get purge on the package that created the user.

All 7 comments

Hi @mabushey

We're unable to replicate this. Any more info you can provide? What version of debian or ubuntu are you using?

Have you customised something? Not sure what the statoverride line is about?

Have you customised something? Not sure what the statoverride line is about?

Looks like it as something to do shroot or virtualization. The deb package is fine if you aren't in whatever situation is triggering this. We've used the 1.6.0 version dozens of times by now and never seen this.

thanks @nik9000 - closing as it sounds like a local issue

'statoverride' is /var/lib/dpkg/statoverride.
dpkg (and apt) will throw this error when

  1. a user is created by a package installer
  2. the user is deleted via the CLI
  3. another dpkg (or apt) install/update is run

The second step removes the user from /etc/password, but not from /var/lib/dpkg/statoverride.
dpkg doesn't like that arrangement.
One fix seems to be doing an apt-get purge on the package that created the user.

@GlenRSmith thx for the heads up! Is there anything we can do inside of our package to improve this use-case?

I know this issue has been closed, but here is a solution that worked for me:
$ sudo sed -i '/elasticsearch/d' /var/lib/dpkg/statoverride
Reference: http://askubuntu.com/questions/506043/how-do-i-remove-a-user-from-the-dpkg-statoverride-file

Was this page helpful?
0 / 5 - 0 ratings