- Newest
- Most votes
- Most comments
If that is the case - and assuming there is no misunderstanding on my part - then you are absolutely correct. This is a clear violation of Debian packaging policy, which requires postinst scripts to be idempotent.
The configure.sh script fails because it expects placeholders that it removed during the first (failed) attempt. This creates a deadlock where dpkg remains in state iF, blocking all subsequent apt operations.
Quick Workaround to unblock apt:
Until AWS releases a fix (e.g., v1.15.1), you can manually force the package to a configured state by bypassing the faulty script:
- Edit the postinst script:
sudo nano /var/lib/dpkg/info/amazon-guardduty-agent.postinst - Add
exit 0at the very top of the script. - Run the configuration fix:
sudo dpkg --configure -a
Recommended fix:
The configure.sh should use a check like grep -q "__OOM_POLICY__" ... before attempting sed, or simply allow sed to fail silently if the pattern is missing, ensuring the script always exits with 0 if the service file is already in the desired state.
Relevant content
- asked a year ago
