Wivern Blog

Personal-Tech memorandum

cloud9にImagemagickをインストール

paperclip導入するにあたりCloud9環境にImagemagickをインストールしようとしたところエラーがでたので インストール方法をメモ。

paperclipの導入手順をみるとsudo apt-get install imagemagick -yと記述があったので そのとおりしたところ以下のエラーが発生。

cloud9
1
2
3
4
5
6
7
8
9
$ sudo apt-get install imagemagick
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package imagemagick 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 surce

E: Package 'imagemagick' has no installation candidate

よくよく調べてみると公式のコミュニティサイトcommunity.c9.ioに 情報があった。

  • apt-get updateでレポジトリの更新
1.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
$ sudo apt-get update

Ign http://downloads-distro.mongodb.org dist InRelease
Ign http://asia-east1.gce.clouds.archive.ubuntu.com trusty InRelease
Get:1 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-updates InRelease [65.9 kB]
Get:2 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-backports InRelease [65.9 kB]
Hit http://ppa.launchpad.net trusty InRelease
Get:3 http://ppa.launchpad.net trusty InRelease [15.4 kB]
Hit http://downloads-distro.mongodb.org dist Release.gpg
Ign http://toolbelt.heroku.com ./ InRelease
Get:4 http://security.ubuntu.com trusty-security InRelease [65.9 kB]
Get:5 http://asia-east1.gce.clouds.archive.ubuntu.com trusty Release.gpg [933 B]
Hit http://downloads-distro.mongodb.org dist Release
Hit http://toolbelt.heroku.com ./ Release.gpg
Get:6 http://asia-east1.gce.clouds.archive.ubuntu.com trusty Release [58.5 kB]
Hit http://toolbelt.heroku.com ./ Release
Get:7 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-updates/main Sources [506 kB]
Get:8 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-updates/restricted Sources [6449 B]
Get:9 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-updates/universe Sources [248 kB]
Get:10 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-updates/multiverse Sources [7225 B]
Get:11 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-updates/main amd64 Packages [1311 kB]
Get:12 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-updates/restricted amd64 Packages [21.4 kB]
Get:13 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-updates/universe amd64 Packages [570 kB]
Get:14 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-updates/multiverse amd64 Packages [16.0 kB]
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Get:15 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-updates/main i386 Packages [1242 kB]
Get:16 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-updates/restricted i386 Packages [21.1 kB]
Hit http://ppa.launchpad.net trusty/main i386 Packages
Get:17 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-updates/universe i386 Packages [565 kB]
Get:18 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-updates/multiverse i386 Packages [16.5 kB]
Get:19 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-backports/main Sources [10.4 kB]
Get:20 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-backports/restricted Sources [40 B]
Get:21 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-backports/universe Sources [41.3 kB]
Get:22 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-backports/multiverse Sources [1747 B]
Get:23 http://ppa.launchpad.net trusty/main amd64 Packages [3456 B]
Get:24 http://ppa.launchpad.net trusty/main i386 Packages [3456 B]
Get:25 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-backports/main amd64 Packages [14.7 kB]
Get:26 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-backports/restricted amd64 Packages [40 B]
Get:27 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-backports/universe amd64 Packages [52.5 kB]
Get:28 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-backports/multiverse amd64 Packages [1392 B]
Get:29 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-backports/main i386 Packages [14.7 kB]
Get:30 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-backports/restricted i386 Packages [40 B]
Hit http://downloads-distro.mongodb.org dist/10gen amd64 Packages
Hit http://toolbelt.heroku.com ./ Packages
Get:31 http://security.ubuntu.com trusty-security/main Sources [190 kB]
Get:32 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-backports/universe i386 Packages [52.4 kB]
Hit http://downloads-distro.mongodb.org dist/10gen i386 Packages
Get:33 http://asia-east1.gce.clouds.archive.ubuntu.com trusty-backports/multiverse i386 Packages [1376 B]
Get:34 http://asia-east1.gce.clouds.archive.ubuntu.com trusty/main Sources [1335 kB]
Get:35 http://asia-east1.gce.clouds.archive.ubuntu.com trusty/restricted Sources [5335 B]
Get:36 http://asia-east1.gce.clouds.archive.ubuntu.com trusty/universe Sources [7926 kB]
Get:37 http://security.ubuntu.com trusty-security/universe Sources [82.1 kB]
Get:38 http://security.ubuntu.com trusty-security/main amd64 Packages [881 kB]
Get:39 http://asia-east1.gce.clouds.archive.ubuntu.com trusty/multiverse Sources [211 kB]
Get:40 http://asia-east1.gce.clouds.archive.ubuntu.com trusty/main amd64 Packages [1743 kB]
Get:41 http://security.ubuntu.com trusty-security/universe amd64 Packages [258 kB]
Get:42 http://asia-east1.gce.clouds.archive.ubuntu.com trusty/restricted amd64 Packages [16.0 kB]
Get:43 http://security.ubuntu.com trusty-security/main i386 Packages [814 kB]
Get:44 http://asia-east1.gce.clouds.archive.ubuntu.com trusty/universe amd64 Packages [7589 kB]
Get:45 http://security.ubuntu.com trusty-security/universe i386 Packages [251 kB]
Get:46 http://asia-east1.gce.clouds.archive.ubuntu.com trusty/multiverse amd64 Packages [169 kB]
Get:47 http://asia-east1.gce.clouds.archive.ubuntu.com trusty/main i386 Packages [1739 kB]
Get:48 http://asia-east1.gce.clouds.archive.ubuntu.com trusty/restricted i386 Packages [16.4 kB]
Get:49 http://asia-east1.gce.clouds.archive.ubuntu.com trusty/universe i386 Packages [7597 kB]
Get:50 http://asia-east1.gce.clouds.archive.ubuntu.com trusty/multiverse i386 Packages [172 kB]
Fetched 36.0 MB in 25s (1401 kB/s)
Reading package lists... Done
W: Size of file /var/lib/apt/lists/ppa.launchpad.net_git-core_ppa_ubuntu_dists_trusty_main_binary-amd64_Packages.gz is not what the server reported 3456 3460
  • imagemagickインストール
1.bash
1
$ sudo apt-get install imagemagick -y
  • imagemagickのバージョン確認
1.bash
1
2
3
4
$ convert --version
Version: ImageMagick 6.7.7-10 2017-07-31 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP