Heroku:需要 Mcrypt PHP 扩展(php7 在 Ubuntu16 上)

Heroku : Mcrypt PHP extension required (php7 on Ubuntu16)

我试图将我的代码推送到 heroku 应用程序上。通常它总是有效,但今天它返回了以下错误:

php artisan clear-compiled
remote: Mcrypt PHP extension required.
remote: Script php artisan clear-compiled handling the post-install-cmd event returned with an error

remote: [RuntimeException]

remote: Error Output:

remote: install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] []...

remote: ! Push rejected, failed to compile PHP app.
remote: ! Push failed
remote: Verifying deploy...
remote: ! Push rejected to dev-forde-hr.

所以我尝试为 php7.0 安装 mcrypt,但它告诉我一切都已安装。

我在 Ubuntu 16 上使用 php7,它是一个 Laravel 4 网络应用程序。

我不知道该怎么办了...

我终于通过将此添加到 composer.json 解决了这个问题:

"ext-mcrypt": "*"

然后作曲家更新