Amavisd failed to restart due to BerkeleyDB, libdb, and db.h incompatibility

後藤潔 pleiads_m45 at icloud.com
Sun Nov 5 00:07:18 UTC 2017


I forced upgrade of amavisd-new by suggestion, but got the same error message.  Amavisd-new is still running with db53  @5.3.21_0+sql.

I would appreciate it if you could file a ticket of this one.

Thank you in advance.

2017/11/05 6:22、Horst Simon <horst.simon at optusnet.com.au> のメール:

> 
>> On 2 Nov 2017, at 16:39, Horst Simon <horst.simon at optusnet.com.au> wrote:
>> 
>> 
>>> On 2 Nov 2017, at 11:06 am, Ryan Schmidt <ryandesign at macports.org> wrote:
>>> 
>>> 
>>>> On Nov 1, 2017, at 06:30, 後藤潔 wrote:
>>>> 
>>>> After upgrade to the latest ports except apache2 2.4.29_0, amavisd failed to restart. Terminal messages are as follows.
>>>> 
>>>> ----- start of messages
>>>> 
>>>> $ sudo amavisd restart
>>>> Password:
>>>> Problem in Amavis::DB or Amavis::DB::SNMP code: 
>>>> BerkeleyDB needs compatible versions of libdb & db.h
>>>>   you have db.h version 5.3.21 and libdb version 5.3.28
>>>> Compilation failed in require at (eval 79) line 20.
>>>> BEGIN failed--compilation aborted at (eval 79) line 20.
>>>> 
>>>> ----- end of messages
>>>> 
>>>> Amavisd is currently working.
>>>> 
>>>> $ ps aux | grep amavisd | grep -v grep
>>>> _amavisd       32094   0.0  0.7  2561356  61540   ??  S     1:20PM   0:00.69 /opt/local/sbin/amavisd (ch8-avail)   
>>>> _amavisd       31901   0.0  0.8  2562380  65112   ??  S     1:10PM   0:01.00 /opt/local/sbin/amavisd (ch10-avail)   
>>>> _amavisd       42175   0.0  0.5  2559996  38608   ??  Ss    21017    0:31.31 /opt/local/sbin/amavisd (master) 
>>>> 
>>>> The current versions on my server are as follows.
>>>> 
>>>> OS: Mac OSX 10.8.5
>>>> MacPorts base: 2.4.2
>>>> amavisd-new @2.10.1_5+perl5_24
>>>> p5.24-mail-spamassassin @3.4.1_3
>>>> perl5 @5.24.2_0+perl5_24
>>>> perl5.24 @5.24.2_0
>>>> db53 @5.3.28_0+sql
>>>> sqlite3 @3.21.0_0
>>>> 
>>>> I have tried to uninstall and reinstall the related ports, but in vain.
>>>> 
>>>> Downgrading db53 to 5.3.21_3+sql from 5.3.28_0+sql, amavisd successfully restarted. The terminal messages are as follows.
>>>> 
>>>> ----- start of messages
>>>> 
>>>> $ sudo port deactivate db53 @5.3.28_0+sql
>>>> Password:
>>>> Note: It is not recommended to uninstall/deactivate a port that has dependents as it breaks the dependents.
>>>> The following ports will break: p5.24-berkeleydb @0.550.0_0
>>>> Continue? [y/N]: y
>>>> Warning: Deactivate forced.  Proceeding despite dependencies.
>>>> --->  Deactivating db53 @5.3.28_0+sql
>>>> --->  Cleaning db53
>>>> $ sudo port activate db53 @5.3.21_3+sql
>>>> --->  Activating db53 @5.3.21_3+sql
>>>> --->  Cleaning db53
>>>> $ sudo amavisd restart
>>>> Daemon [42175] terminated by SIGTERM, waiting for dust to settle...
>>>> becoming a new daemon...
>>>> $ ps aux | grep amavisd | grep -v grep
>>>> _amavisd       34278   0.0  0.1  2562792   8660   ??  S     2:53PM   0:00.01 /opt/local/sbin/amavisd (virgin child)   
>>>> _amavisd       34277   0.0  0.1  2562792   8536   ??  S     2:53PM   0:00.01 /opt/local/sbin/amavisd (virgin child)   
>>>> _amavisd       34276   0.0  0.8  2561432  70388   ??  Ss    2:53PM   0:01.16 /opt/local/sbin/amavisd (master) 
>>>> 
>>>> ----- end of messages
>>>> 
>>>> Any suggestions or advices are wellcome.
>>> 
>>> I don't know if there's a valid reason for this, but it sounds like when amavisd-new is compiled, the version of db53, as listed in the db.h header, is recorded into the perl modules installed with amavisd-new. Then, when the db53 port is later updated, the version recorded into its library is no longer the same as the one amavisd-new was compiled with, which results in the error.
>>> 
>>> If we can verify that that's what's going on, then:
>>> 
>>> We could ask the developers of amavisd-new why they do this.
>>> 
>>> We should revbump amavisd-new to rebuild it. This will need to be done anyway along with other changes to switch to perl5.26: https://trac.macports.org/ticket/55208
>>> 
>>> We should add a comment in the db53 port advising the maintainer to revbump amavisd-new whenever the version of db53 is changed.
>>> 
>>> Until that's done, you could work around the problem by rebuilding amavisd-new after reactivating db53 @5.3.28:
>>> 
>>> sudo port activate db53 @5.3.28_0+sql
>>> sudo port -ns upgrade --force amavisd-new
>>> 
>> 
>> I had the following failure after a new install when trying to start amavis and still get the following error
>> after I tried above suggestion.
>> 
>> Problem in Amavis::DB or Amavis::DB::SNMP code: 
>> BerkeleyDB needs compatible versions of libdb & db.h
>>   you have db.h version 5.3.21 and libdb version 5.3.28
>> Compilation failed in require at (eval 79) line 20.
>> BEGIN failed--compilation aborted at (eval 79) line 20.
>> 
>> Regards,
>> Horst
>> 
> 
> Should I file a ticket for this one?
> 
> Horst



More information about the macports-users mailing list