Strange behaviour installing php7.1 on Debian

New to Debian (Or Linux in general)? Ask your questions here!

Strange behaviour installing php7.1 on Debian

Postby banderas20 » 2018-07-01 11:07

Hello,

I'm issuing the command:

Code: Select all
apt-get install apache2 php7.1 mysql-server php7.1-mysql libapache2-mod-php7.1 php7.1-gd php7.1-curl php7.1-xmlrpc php7.1-intl php7.1-zip php7.1-mbstring


And it gives me the error:

Code: Select all
E: Could'nt find any package by regex 'php7.1'


and some other similar errors. OK. I give up and go on with php 7.0. So I issue the command:

Code: Select all
apt-get install apache2 mysql-server php7.0


Everything works fine. But later, I try again and issue

Code: Select all
apt-get install apache2 php7.1 mysql-server php7.1-mysql libapache2-mod-php7.1 php7.1-gd php7.1-curl php7.1-xmlrpc php7.1-intl php7.1-zip php7.1-mbstring


And this time everything install without any single error. Without any repository being added.

¿Why is this behaviour?

Not to mention that now I have php 7.0 and 7.1...

Thanks and regards!
banderas20
 
Posts: 52
Joined: 2016-11-10 15:30

Re: Strange behaviour installing php7.1 on Debian

Postby bw123 » 2018-07-01 13:11

...
And this time everything install without any single error. Without any repository being added. ¿Why is this behaviour?
...


You can probably find out by using
Code: Select all
apt policy


You can use it by itself or with pkg names, even wildcards like
Code: Select all
apt policy php*

since one is from stretch, the other testing/sid, my guess would be you have mixed stable with another release. Which do you wish to use?
User avatar
bw123
 
Posts: 3139
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Strange behaviour installing php7.1 on Debian

Postby banderas20 » 2018-07-01 16:05

I don't understand the output of
Code: Select all
apt policy

BTW, I want to use PHP 7.1
banderas20
 
Posts: 52
Joined: 2016-11-10 15:30

Re: Strange behaviour installing php7.1 on Debian

Postby GarryRicketson » 2018-07-01 16:35

Unread postby banderas20 » 2018-07-01 10:05
I don't understand the output of apt policy

Well, nobody can try to explain what the output means if you don't show us the out put.
If you want help you need to help by including details.
User avatar
GarryRicketson
 
Posts: 4869
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Strange behaviour installing php7.1 on Debian

Postby banderas20 » 2018-07-01 17:27

Output of "apt policy":

Code: Select all
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 https://packages.sury.org/php stretch/main amd64 Packages
     release o=deb.sury.org,n=stretch,c=main,b=amd64
     origin packages.sury.org
 500 http://repo.mysql.com/apt/debian stretch/mysql-tools amd64 Packages
     release o=MySQL,n=stretch,l=MySQL,c=mysql-tools,b=amd64
     origin repo.mysql.com
 500 http://repo.mysql.com/apt/debian stretch/mysql-5.7 amd64 Packages
     release o=MySQL,n=stretch,l=MySQL,c=mysql-5.7,b=amd64
     origin repo.mysql.com
 500 http://repo.mysql.com/apt/debian stretch/mysql-apt-config amd64 Packages
     release o=MySQL,n=stretch,l=MySQL,c=mysql-apt-config,b=amd64
     origin repo.mysql.com
 500 http://ftp.es.debian.org/debian stretch-updates/main amd64 Packages
     release o=Debian,a=stable-updates,n=stretch-updates,l=Debian,c=main,b=amd64
     origin ftp.es.debian.org
 500 http://security.debian.org/debian-security stretch/updates/non-free amd64 Packages
     release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=non-free,b=amd64
     origin security.debian.org
 500 http://security.debian.org/debian-security stretch/updates/contrib amd64 Packages
     release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=contrib,b=amd64
     origin security.debian.org
 500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
     release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=main,b=amd64
     origin security.debian.org
 500 http://ftp.es.debian.org/debian stretch/non-free amd64 Packages
     release v=9.4,o=Debian,a=stable,n=stretch,l=Debian,c=non-free,b=amd64
     origin ftp.es.debian.org
 500 http://ftp.es.debian.org/debian stretch/contrib amd64 Packages
     release v=9.4,o=Debian,a=stable,n=stretch,l=Debian,c=contrib,b=amd64
     origin ftp.es.debian.org
 500 http://ftp.es.debian.org/debian stretch/main amd64 Packages
     release v=9.4,o=Debian,a=stable,n=stretch,l=Debian,c=main,b=amd64
     origin ftp.es.debian.org
Pinned packages:
banderas20
 
Posts: 52
Joined: 2016-11-10 15:30

Re: Strange behaviour installing php7.1 on Debian

Postby bw123 » 2018-07-01 17:38

Just tell people what you did, there's no point in dragging it out. You either mixed repos, or ran make install or downloaded some binary.

Code: Select all
$ apt policy php7.0 php7.1 php7.2


viewtopic.php?f=30&t=137949
I have come to have php 7.0, 7.1 and 7.2 installed on a single system.


How do you know? Show us.
User avatar
bw123
 
Posts: 3139
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Strange behaviour installing php7.1 on Debian

Postby banderas20 » 2018-07-01 18:01

bw123 wrote:Just tell people what you did, there's no point in dragging it out. You either mixed repos, or ran make install or downloaded some binary.


I'm not trying to drag out anything. I am being as clear as I can.

bw123 wrote:
Code: Select all
$ apt policy php7.0 php7.1 php7.2


Output:

Code: Select all
php7.0:
  Installed: 7.0.30-1+0~20180505045735.18+stretch~1.gbpcfecb9
  Candidate: 7.0.30-1+0~20180505045735.18+stretch~1.gbpcfecb9
  Version table:
 *** 7.0.30-1+0~20180505045735.18+stretch~1.gbpcfecb9 500
        500 https://packages.sury.org/php stretch/main amd64 Packages
        100 /var/lib/dpkg/status
     7.0.27-0+deb9u1 500
        500 http://ftp.es.debian.org/debian stretch/main amd64 Packages
        500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
php7.1:
  Installed: 7.1.18-1+0~20180611145904.18+stretch~1.gbp2b32f6
  Candidate: 7.1.18-1+0~20180611145904.18+stretch~1.gbp2b32f6
  Version table:
 *** 7.1.18-1+0~20180611145904.18+stretch~1.gbp2b32f6 500
        500 https://packages.sury.org/php stretch/main amd64 Packages
        100 /var/lib/dpkg/status
php7.2:
  Installed: (none)
  Candidate: 7.2.7-1+0~20180622080745.23+stretch~1.gbpfd8e2e
  Version table:
     7.2.7-1+0~20180622080745.23+stretch~1.gbpfd8e2e 500
        500 https://packages.sury.org/php stretch/main amd64 Packages


bw123 wrote:
viewtopic.php?f=30&t=137949
I have come to have php 7.0, 7.1 and 7.2 installed on a single system.


How do you know? Show us.


This command gave me the clue:

Code: Select all
cd /etc/php & ls
[1] 1623
[b]7.0  7.1  7.2[/b]
[1]+  Done                    cd /etc/php


Thanks!
banderas20
 
Posts: 52
Joined: 2016-11-10 15:30

Re: Strange behaviour installing php7.1 on Debian

Postby bw123 » 2018-07-01 18:08

https://github.com/oerdnj/deb.sury.org/ ... e-Versions

the FAQ says check/set the /etc/alternatives/php link
User avatar
bw123
 
Posts: 3139
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Strange behaviour installing php7.1 on Debian

Postby banderas20 » 2018-07-01 19:09

bw123 wrote:https://github.com/oerdnj/deb.sury.org/wiki/Managing-Multiple-Versions

the FAQ says check/set the /etc/alternatives/php link


I'll give it a try. Thanks! :)
banderas20
 
Posts: 52
Joined: 2016-11-10 15:30


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable