3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Docker+RailsでImageMagickをインストール

Posted at

##開発環境##

  • Docker 20.10.2
  • Ruby 2.6.4
  • Rails 6.0.3
  • PostgreSQL 11.2

##躓いたところ##
webコンテナ上でImageMagickを

$ sudo apt-get update 
$ sudo apt-get -y install imagemagick libmagick++-dev

でインストールしようとするとupdateの段階で

sudo: apt-get: command not found

と言われ,installまで辿り着かない。

##原因##
Dockerのruby 2.5から仕様が変わったため、パッケージのインストールコマンドはapt系ではなく、apkを利用する必要があるとのこと。
##解決方法##

$ sudo apk update 
$ sudo apk add --no-cache imagemagick

の順に実行するとできた。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?