I m trying to install
php 5.5 and
php5-memcached for my machine which has php 5.3 pre-installed. Also, I can not change default configuration as it is staging box provided for CI.So let's assume php 5.3 is pre-installed and that can not be changed.
So, first thing first I try to install php, then php-memcached:
sudo apt-get update sudo apt-get -o Dpkg::Options::="--force-confnew" -o Dpkg::Options::="--force-overwrite" install -y php5 sudo apt-get -o Dpkg::Options::="--force-confnew" -o Dpkg::Options::="--force-overwrite" install -y php5-memcached
The important thing is that commands above are invoked by build runner, therefore, it is not "interactive" mode as there is no "user" who is taking care of installation.
The problem is that because of existing php 5.3 I'm getting:
(B)0Package configuration┌──────────────────────┤ Modified configuration file ├──────────────────────┐│ A new version of configuration file /etc/php5/cli/php.ini is available, ││ but the version installed currently has been locally modified.││││ What do you want to do about modified configuration file php.ini?││││install the package maintainer's version││keep the local version currently installed ││show the differences between the versions││show a side-by-side difference between the versions││start a new shell to examine the situation│││││││││└───────────────────────────────────────────────────────────────────────────┘
That is because it found some modified config file. And the question is - can I somehow force it to be overwritten? As you can see, I already tried
-o Dpkg::Options::="--force-confnew" -o Dpkg::Options::="--force-overwrite" without any success (I suppose that's because this "dialog" is not related to dpkg). The issue with this "dialog" is, obviously, in the fact, that all setup commands are invoked from inside CI container, and there is no "user" who can do any "action" - it should be completely automatic execution.
Question: How can I force overwriting any configs in this case? Or else, how can I achieve initial goal and upgrade php from 5.3 to 5.5 and then install php5-memcached?