php7 for imagecreatefromjpeg - Package' php5-gd'没有安装候选人?

时间:2017-05-06 01:40:28

标签: php-7 php-5.6 imagecreatefrompng

我在php7上,但我有一个遗留程序使用:

imagecreatefromjpeg($filename)

所以我尝试安装:

$ sudo apt-get install php5-gd

没有结果:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package php5-gd is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php5-gd' has no installation candidate

我应该为php7安装什么?

或者更好的是,我应该用{<1}}替换什么?

有什么想法吗?

我在php.ini中启用了imagecreatefromjpeg

但我仍然会收到此错误:

  

未捕获错误:调用未定义的函数imagecreatefromjpeg()in   的/ var /瓦特

1 个答案:

答案 0 :(得分:1)