我已将系统升级到ubuntu 16.04 LTS,现在我已经发布了这个较新的版本安装PHP 7并删除了PHP 5,如何在ubuntu 16.04 LTS上安装PHP 5.4?
我试过了:
-(void)handlePinchWithGestureRecognizer:(UIPinchGestureRecognizer *)pinchGestureRecognizerher //UIFont *font = txtqutoes.font;
CGFloat pointSize = font.pointSize;
NSString *fontName = font.fontName;
UIFont *font = textview.font;
pointSize = ((pinchGestureRecognizer.velocity > 0) ? 1 : -1) * 1 + pointSize;
if (pointSize < 13) pointSize = 13;
if (pointSize > 80) pointSize = 80;
textview.font = [UIFont fontWithName:fontName size:pointSize];
我收到了这个错误:
sudo apt-get install php5
答案 0 :(得分:4)
Ubuntu 16.04附带PHP7,没有PHP5软件包。 删除所有php7包:
sudo aptitude purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "
新PPA
sudo add-apt-repository ppa:ondrej/php
更新套餐:
sudo apt-get update
安装PHP:
sudo apt-get install php5.6
检查PHP版本:
php -v