Whenever I try to run this code
example@testserver:~$ sudo apt-get install php5-xdebug
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php5-xdebug
I get this error "E: Unable to locate package php5-xdebug"
Please help
Thanks
If you're running the default apt
installation of PHP on Ubuntu 16.04, then it should be PHP7. If I had to guess from php5-xdebug
, then I'd say you were using a command intended for Ubuntu 14.04 or older where the default PHP installation was PHP5. You can verify your PHP version with:
php --version
This is what I see:
PHP 7.0.8-0ubuntu0.16.04.2 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.8-0ubuntu0.16.04.2, Copyright (c) 1999-2016, by Zend Technologies with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans
At any rate, you should be able to search available packages for your configuration with:
apt search xdebug
From my relatively fresh Ubuntu 16.04 install without any added PPA's, I get one result:
php-xdebug
- Xdebug Module for PHP
So you can install this package by name (note the missing "5" from your command):
sudo apt install php-xdebug
You might also have to restart your webserver. If you're running the stock build of Apache for Ubuntu 16.04:
sudo service apache2 restart
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With