Ticket #968 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

APT Fails to Install Packages

Reported by: [email protected] Owned by: desai
Priority: minor Milestone: Bcfg2 1.2.0 Release
Component: bcfg2-client Version: 1.0
Keywords: APT cron Cc:


When run as root from a job in /etc/cron.d/bcfg2 APT doesn't function since dpkg isn't happy with the cron environment.

Bcfg2.Client.Frame[24015]: < dpkg: warning: 'ldconfig' not found on PATH.

dpkg: warning: 'start-stop-daemon' not found on PATH.

dpkg: warning: 'update-rc.d' not found on PATH.

dpkg: 3 expected program(s) not found on PATH.

root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.

E: Sub-process /usr/bin/dpkg returned an error code (2)

solj suggested filing this bug report. This can be resolved by changing the cron ENV in some way (running in a wrapper script, specifying a path before the command, etc.)


Change History

comment:1 Changed 12 years ago by desai

  • Status changed from new to closed
  • Resolution set to fixed

I've committed a fix that ensures that /sbin and /usr/sbin are in the path (added at the end, so that they can be overridden if desired. Commited in [1e601ac56f7a91631274f26dfc3cef7a4be5b3bc]. Thanks for the report.

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.