반응형
Package 'php5' has no installation candidate
Ubuntu 16.04 에서 php5를 설치하려고 하면 위와 같은 에러가 발생한다.
이는 php7이 default 이기 때문인데 다음과 같은 방법으로 해결할 수 있다.
Ubuntu 16.04 comes with PHP7 as the standard, so there are no PHP5 packages
However if you like you can add a PPA to get those packages anyways:
Remove all the stock php packages
List installed php packages with dpkg -l | grep php| awk '{print $2}' |tr "\n" " "
then remove unneeded packages with sudo aptitude purge your_packages_here or if you want to directly remove them all use :
sudo aptitude purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`
Add the PPA
sudo add-apt-repository ppa:ondrej/php
Install your PHP Version
sudo apt-get update
sudo apt-get install php5.6
You can install php5.6 modules too ..
Verify your version
sudo php -v
출처 : http://stackoverflow.com/questions/36788873/package-php5-have-no-installation-candidate-ubuntu-16-04
반응형
'Coding > 오류해결' 카테고리의 다른 글
PHP Call to undefined function xml_parser_create() 에러 해결방법 (0) | 2017.02.01 |
---|---|
E: Package 'php5-mysql' has no installation candidate 에러 해결방법 (0) | 2017.01.18 |
Cannot use object of type stdClass as array 에러 (0) | 2016.02.27 |
Cannot send session cookie - headers already sent by 세션오류 (0) | 2016.01.24 |
C# Webbrowser 자바스크립트 에러 disable (0) | 2015.11.13 |