Solved PRE-INSTALL script failed

Hi, I am using FreeBSD 12.1-RELEASE-p2
I was trying to install Bareos package, and I got this error:

Code:
# pkg install bareos-client-18.2.7
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 3 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        bareos-client: 18.2.7
        jansson: 2.12
        lzo2: 2.10_1

Number of packages to be installed: 3

The process will require 2 MiB more space.
504 KiB to be downloaded.

Proceed with this action? [y/N]: y
[1/3] Fetching bareos-client-18.2.7.txz: 100%  351 KiB 359.7kB/s    00:01    
[2/3] Fetching jansson-2.12.txz: 100%   42 KiB  42.7kB/s    00:01    
[3/3] Fetching lzo2-2.10_1.txz: 100%  111 KiB 113.7kB/s    00:01    
Checking integrity... done (0 conflicting)
[1/3] Installing jansson-2.12...
[1/3] Extracting jansson-2.12: 100%
[2/3] Installing lzo2-2.10_1...
[2/3] Extracting lzo2-2.10_1: 100%
[3/3] Installing bareos-client-18.2.7...
===> Creating groups.
Creating group 'bareos' with gid '997'.
===> Creating users
Creating user 'bareos' with uid '997'.
pw: user 'bareos' disappeared during update
install: unknown user bareos
pkg: PRE-INSTALL script failed

I am trying to figure why I got this error, I also did a couple of check:

Code:
root@backup:~ # pw userdel bareos -r
pw: no such user `bareos'
root@backup:~ # grep 997 /etc/passwd
bareos:*:997:997:Bareos Daemon:/var/db/bareos:/usr/sbin/nologin
root@backup:~ # 
root@backup:~ # 
root@backup:~ # grep bareos /etc/passwd 
bareos:*:997:997:Bareos Daemon:/var/db/bareos:/usr/sbin/nologin

Any suggestion?
Thank you
 
Code:
Creating user 'bareos' with uid '997'.
pw: user 'bareos' disappeared during update

This is something that occasionally happens, on any kind of account. Your databases got out of sync.

 
I get them every now and then too. I know how to fix it but I'm still wondering why it happens though. It appears to be some sort of race condition.
 
Back
Top