Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Strange behaviour installing php7.1 on Debian

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
banderas20
Posts: 111
Joined: 2016-11-10 15:30

Strange behaviour installing php7.1 on Debian

#1 Post by banderas20 »

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!

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Strange behaviour installing php7.1 on Debian

#2 Post by bw123 »

...
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?
resigned by AI ChatGPT

banderas20
Posts: 111
Joined: 2016-11-10 15:30

Re: Strange behaviour installing php7.1 on Debian

#3 Post by banderas20 »

I don't understand the output of

Code: Select all

apt policy
BTW, I want to use PHP 7.1

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Strange behaviour installing php7.1 on Debian

#4 Post by GarryRicketson »

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.

banderas20
Posts: 111
Joined: 2016-11-10 15:30

Re: Strange behaviour installing php7.1 on Debian

#5 Post by banderas20 »

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:

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Strange behaviour installing php7.1 on Debian

#6 Post by bw123 »

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
http://forums.debian.net/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.
resigned by AI ChatGPT

banderas20
Posts: 111
Joined: 2016-11-10 15:30

Re: Strange behaviour installing php7.1 on Debian

#7 Post by banderas20 »

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:
http://forums.debian.net/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!

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Strange behaviour installing php7.1 on Debian

#8 Post by bw123 »

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

the FAQ says check/set the /etc/alternatives/php link
resigned by AI ChatGPT

banderas20
Posts: 111
Joined: 2016-11-10 15:30

Re: Strange behaviour installing php7.1 on Debian

#9 Post by banderas20 »

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

the FAQ says check/set the /etc/alternatives/php link
I'll give it a try. Thanks! :)

Post Reply