0

Please help setup preferences for installing php7.0 and relative packages (some of it not a stable release).

I have OS Debian 8.

I setup sources lists for packages in etc\apt\sources.list.d\:

security.list

deb http://security.debian.org/ stable/updates  main contrib non-free
deb http://security.debian.org/ testing/updates main contrib non-free

stable.list

deb     http://ftp.de.debian.org/debian/ stable main contrib non-free
deb-src http://ftp.de.debian.org/debian/ stable main contrib non-free

testing.list

deb     http://ftp.de.debian.org/debian/ testing main contrib non-free
deb-src http://ftp.de.debian.org/debian/ testing main contrib non-free

unstable.list

deb     http://ftp.de.debian.org/debian/ unstable main contrib non-free
deb-src http://ftp.de.debian.org/debian/ unstable main contrib non-free

I setup some preference files for packages in etc\apt\preferences.d\:

security.pref

Package: *
Pin: release l=Debian-Security
Pin-Priority: 1000

stable.pref

Package: *
Pin: release a=stable
Pin-Priority: 900

testing.pref

Package: *
Pin: release a=testing
Pin-Priority: 750

unstable.pref

Package: *
Pin: release a=unstable
Pin-Priority: 50

I created file 99default-release in etc\apt\apt.conf.d\ with content:

APT::Default-Release "stable";

And finally when i run command for installation php7.0 i have next error:

root@machie:/etc# apt-get install php7.0

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php7.0 : Depends: libapache2-mod-php7.0 but it is not going to be installed or
                   php7.0-fpm but it is not going to be installed or
                   php7.0-cgi but it is not going to be installed
W: No priority (or zero) specified for pin
E: Unable to correct problems, you have held broken packages.

P.S. Without sources, preferences and apt.conf file php7.0 installed success form "deb http://packages.dotdeb.org jessie all" repo. But i hope it is possible setup preferences.

Tero Kilkanen
  • 34,499
  • 3
  • 38
  • 58
DARK_DIESEL
  • 101
  • 3

1 Answers1

0

I just delete http://packages.dotdeb.org repo from sources.list. Now i can install testing release from debian repo by executing command:

sudo apt-get install -f -y -t testing php7.0 php7.0-curl php7.0-cli php7.0-gd php7.0-xml php7.0-mbstring php-xdebug

with all dependence (apache2 etc.)

For update testing packages run command:

apt-get install `apt-show-versions -u -b | grep testing`

For downgrade to stable release any package, create file in etc\apt\preferences.d\ with next content:

Package: <package_name_here> 
Pin: release a=testing
Priority: 1001

and run apt-get update

DARK_DIESEL
  • 101
  • 3