#ブラウザを立ち上げようとすると GD not installed
現在、herokuでアプリをデプロイしようとしているのですが、heroku open
でブラウザを開くと、GD not
installed と表示されてしまいます。
しかし、php -m | grep gd
のコマンドを打つと、gdと出てきます。
terminal
1❯ php -m | grep gd [master] 2gd
調べても原因がわからないので、どのような原因が考えられうるか教えていただきたいです。
#やってみたこと
composer.jsonのrequireに"ext-mbstring": "*"
,"ext-gd": "*"
を追記
↓composer.json追記前
terminal
1❯ git push heroku master [master] 2Enumerating objects: 3, done. 3Counting objects: 100% (3/3), done. 4Delta compression using up to 4 threads 5Compressing objects: 100% (2/2), done. 6Writing objects: 100% (2/2), 222 bytes | 111.00 KiB/s, done. 7Total 2 (delta 1), reused 0 (delta 0) 8remote: Compressing source files... done. 9remote: Building source: 10remote: 11remote: -----> PHP app detected 12remote: -----> Bootstrapping... 13remote: -----> Installing platform packages... 14remote: - php (7.2.12) 15remote: - nginx (1.8.1) 16remote: - apache (2.4.37) 17remote: -----> Installing dependencies... 18remote: Composer version 1.7.2 2018-08-16 16:57:12 19remote: Loading composer repositories with package information 20remote: Installing dependencies from lock file 21remote: Nothing to install or update 22remote: Generating optimized autoload files 23remote: -----> Preparing runtime environment... 24remote: NOTICE: No Procfile, using 'web: heroku-php-apache2'. 25remote: -----> Checking for additional extensions to install... 26remote: -----> Discovering process types 27remote: Procfile declares types -> web 28remote: 29remote: -----> Compressing... 30remote: Done: 18.2M 31remote: -----> Launching... 32remote: Released v8 33remote: https://***.herokuapp.com/ deployed to Heroku 34remote: 35remote: Verifying deploy... done. 36To https://git.heroku.com/***.git 37 65611bc..5bb45bb master -> master
↓composer.json追記後
terminal
1❯ git push heroku master [master] 2Enumerating objects: 5, done. 3Counting objects: 100% (5/5), done. 4Delta compression using up to 4 threads 5Compressing objects: 100% (3/3), done. 6Writing objects: 100% (3/3), 331 bytes | 331.00 KiB/s, done. 7Total 3 (delta 1), reused 0 (delta 0) 8remote: Compressing source files... done. 9remote: Building source: 10remote: 11remote: -----> PHP app detected 12remote: -----> Bootstrapping... 13remote: 14remote: ! WARNING: Your 'composer.lock' is out of date! 15remote: ! 16remote: ! The 'composer.lock' file in your project is not up to date with 17remote: ! the main 'composer.json' file. This may result in installation 18remote: ! of incorrect packages or package versions. 19remote: ! 20remote: ! The lock file is required in order to guarantee reliable and 21remote: ! reproducible installation of dependencies across systems and 22remote: ! deploys. It must always be kept in sync with 'composer.json'. 23remote: ! 24remote: ! Whenever you change 'composer.json', ensure that you perform 25remote: ! the following steps locally on your computer: 26remote: ! 1) run 'composer update' 27remote: ! 2) add all changes using 'git add composer.json composer.lock' 28remote: ! 3) commit using 'git commit' 29remote: ! 30remote: ! Ensure that you updated the lock file correctly, and that you 31remote: ! ran 'git add' on both files, before deploying again. 32remote: ! 33remote: ! Please remember to always keep your 'composer.lock' updated in 34remote: ! lockstep with 'composer.json' to avoid common problems related 35remote: ! to dependencies during collaboration and deployment. 36remote: ! 37remote: ! Please refer to the Composer documentation for further details: 38remote: ! https://getcomposer.org/doc/ 39remote: ! https://getcomposer.org/doc/01-basic-usage.md 40remote: 41remote: -----> Installing platform packages... 42remote: - php (7.2.12) 43remote: - nginx (1.8.1) 44remote: - apache (2.4.37) 45remote: -----> Installing dependencies... 46remote: Composer version 1.7.2 2018-08-16 16:57:12 47remote: Loading composer repositories with package information 48remote: Installing dependencies from lock file 49remote: Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them. 50remote: Nothing to install or update 51remote: Generating optimized autoload files 52remote: -----> Preparing runtime environment... 53remote: NOTICE: No Procfile, using 'web: heroku-php-apache2'. 54remote: -----> Checking for additional extensions to install... 55remote: -----> Discovering process types 56remote: Procfile declares types -> web 57remote: 58remote: -----> Compressing... 59remote: Done: 18.2M 60remote: -----> Launching... 61remote: Released v9 62remote: https://***.herokuapp.com/ deployed to Heroku 63remote: 64remote: Verifying deploy... done. 65To https://git.heroku.com/***.git 66 5bb45bb..aadf7d6 master -> master
#環境
Mac
php 7.1.19
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。