1

OS: Ubuntu 20.04 focal (on the Windows Subsystem for Linux) Kernel: x86_64 Linux 5.10.102.1-microsoft-standard-WSL2 Uptime: 1h 20m Packages: 1612 Shell: bash 5.0.17 WM: GTK Theme: Adwaita [GTK3] Disk: 819G / 2.8T (30%) CPU: Intel Celeron N5105 @ 4x 1.997GHz RAM: 645MiB / 3811MiB

Following the instructions at Xdebug.org , I decided to try Ondřej Surý's PPA to let apt install xdebug for my php version, 7.4 Using the following command per the instructions at Xdebug.org, sudo apt-get install php7.4-xdebug By default, this is what apt wants to install:

The following NEW packages will be installed:  
php7.4-xdebug php8.1-cli php8.1-common php8.1-opcache php8.1-phpdbg php8.1-readline php8.1-xdebug 
The following packages will be upgraded:  libpcre2-8-0 php-xdebug

I've used his repository in the past, and found that I didn't like the resulting configuration as I did let it upgrade to php8.x. However, I respect that Xdebug.org suggests using that ppa, and I know it's popular especically for those who want to have multiple PHP versions installed. Is it possible to "force" apt to not include the php8 versions? I did some research on this particular issue, but I didn't find anything specific to exclusion. My web apps wont break if I let it upgrade to v8, but my production servers run 7.4 so it makes sense for me to develop in that environment at this time.

Is there a recommended apt command to exclude the version upgrade in this instance? I don't want to install php8 on this WSL2 Ubuntu environment.

  • Which command did you run that gave this output? – Tero Kilkanen Sep 17 '22 at 09:43
  • updated o/p. the command is taken from the Xdebug.org instructions as linked above: `sudo apt-get install php7.4-xdebug` – Sylvester DeMouser Sep 18 '22 at 14:38
  • FTR, i did `sudo add-apt-repository -r ppa:ondrej/php` to remove the repo. I will revisit this (specifically) at another time. though I would like to know if that's an option when using apt. I typically just let apt do what it wants to do, but this being a "third-party" ppa which is giving apt the option to upgrade to distro-unsupported versions specific to that ppa, i thought perhaps apt would allow for exclusion. If it's an option, I've clearly forgotten how to do it. I might revisit Aptitude. There used to be a useful site w/ guidance for Aptitude, but domain is now offline best regards! – Sylvester DeMouser Sep 18 '22 at 14:46
  • i believe this is [the same aptitude guide](https://www.debian.org/doc/manuals/aptitude/ch02s04s05.en.html) which i remarked above is offline. – Sylvester DeMouser Sep 18 '22 at 14:54
  • If you have installed PHP 7.4 from Ubuntu packages, then installing xdebug from Ondrej's PPA can have odd effects. I recommend that you use Ondrej's PPA for all PHP related packages and remove packages installed by your OS. – Tero Kilkanen Sep 19 '22 at 00:01
  • @TeroKilkanen - Hi Tero. Thank you for that advice! I didn't realize this post had any more replies. Best wishes! – Sylvester DeMouser Dec 08 '22 at 06:00

0 Answers0