我在 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安装什么?
或者更好,我应该用什么代替imagecreatefromjpeg
?
有任何想法吗?
我extension=php_gd2.dll
在我的 php.ini 中启用了。
但我仍然收到此错误:
未捕获的错误:调用 /var/w 中未定义的函数 imagecreatefromjpeg()