Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apt error: File on system created by you or by a script

Tags:

apt

dpkg

I have a simple bash script that connects to a series of servers and updates a specific package, using a here-string to answer a prompt:

sudo /usr/bin/apt-get install package-name <<< Y

The prompt is:

Configuration file /etc/package-name/package-name.conf
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
  What would you like to do about it? Your options are:
  Y or I : install the package maintainer's version
  N or O : keep your currently-installed version
    D    : show the differences between the versions
    Z    : background this process to examine the situation
 The default action is to keep your current version.
*** package-name.conf (Y/I/N/O/D/Z [default=N] ?

This is the error when it doesn't work:

dpkg: error processing package-name (--configure):
EOF on stdin a conffile prompt
Errors were encountered while processing:
package-name

I'm not able to install expect or any other programs on the servers. Any help would be appreciated.

like image 278
fja Avatar asked Aug 23 '11 04:08

fja


2 Answers

You should pass in a dpkg option to specify at the prompt the desired behavior in this scenario. Then it won't prompt.

sudo apt-get -o DPkg::Options::="--force-confnew" -y install package-name

(Untested; obtained by googling.)

like image 106
tripleee Avatar answered Sep 22 '22 00:09

tripleee


If you look at the apt-get man page, you can find an option (-y) to answer yes for you. Why not try that.

like image 32
ghostdog74 Avatar answered Sep 22 '22 00:09

ghostdog74