CRONの問題 - apt-get dist-upgrade操作

CRONの問題 - apt-get dist-upgrade操作

この問題はDebian 8.4に関連しています。

複数のデスクトップステーションと未使用のサーバーに同じアップデートメカニズムを適用しました。この問題はサーバーで発生しますが、これらすべてのステーションでも発生すると考えられます。

このスレッドで説明されているようにcronジョブを記録し、今すぐアップデートを待っています。それが来て、エラーメッセージが表示されます。それは私にとって完全に横説説です。

ここでどのように設定したかを見てください。 crontabが正常に動作しているかどうかはどうすればわかりますか?

アーカイブをダウンロードしようとすると、ログの関連部分が起動します。

Apr  8 00:00:42 vb-srv-debian updates: Need to get 108 MB of archives.
Apr  8 00:00:42 vb-srv-debian updates: After this operation, 20.5 kB of additional disk space will be used.
Apr  8 00:00:42 vb-srv-debian updates: Get:1 http://dl.google.com/linux/chrome/deb/ stable/main google-chrome-stable amd64 49.0.2623.112-1 [48.5 MB]
Apr  8 00:00:42 vb-srv-debian updates: Get:2 http://nightly.odoo.com/9.0/nightly/deb/ ./ odoo 9.0c.20160407 [59.6 MB]
Apr  8 00:00:54 vb-srv-debian updates: Reading changelogs...
Apr  8 00:01:01 vb-srv-debian updates: debconf: unable to initialize frontend: Dialog
Apr  8 00:01:01 vb-srv-debian updates: debconf: (TERM is not set, so the dialog frontend is not usable.)
Apr  8 00:01:01 vb-srv-debian updates: debconf: falling back to frontend: Readline
Apr  8 00:01:01 vb-srv-debian updates: debconf: unable to initialize frontend: Readline
Apr  8 00:01:01 vb-srv-debian updates: debconf: (This frontend requires a controlling tty.)
Apr  8 00:01:01 vb-srv-debian updates: debconf: falling back to frontend: Teletype
Apr  8 00:01:01 vb-srv-debian updates: dpkg-preconfigure: unable to re-open stdin:
Apr  8 00:01:01 vb-srv-debian updates: Fetched 108 MB in 11s (9,111 kB/s)
Apr  8 00:01:01 vb-srv-debian updates: dpkg: warning: 'ldconfig' not found in PATH or not executable
Apr  8 00:01:01 vb-srv-debian updates: dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
Apr  8 00:01:01 vb-srv-debian updates: dpkg: error: 2 expected programs not found in PATH or not executable
Apr  8 00:01:01 vb-srv-debian updates: Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
Apr  8 00:01:01 vb-srv-debian updates: E: Sub-process /usr/bin/dpkg returned an error code (2)

私は主な問題が変数に関連していると疑いますが$PATH、現在はそれがどのように使用されているのか理解していません。

is の場合、root次の変数の値が返されます。

$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

$ echo $TERM
xterm

ベストアンサー1

cron一般に、かなり小さな環境(man 5 crontab実際には何かを確認)でタスクを実行すると、これを達成するための十分なリソースがない可能性があります。何か見たいならはい移動中はいつでもprintenv > /tmp/cron_env(おそらく近いうちに)立ち寄って見ることができます。通常、PATHcrontabファイルで更新を定義します。man 5 crontab詳しくはもう一度ご覧ください。

おすすめ記事