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

php7 for imagecreatefromjpeg - Package 'php5-gd' has no installation candidate?

我在 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

有什么想法吗?

我在 php.ini 中启用了 extension=php_gd2.dll

但我仍然得到这个错误:

Uncaught Error: Call to undefined function imagecreatefromjpeg() in /var/w

根据PHP.nethttp://php.net/manual/en/image.installation.php#120116

sudo apt-get install php7.0-gd