7
8

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 5 years have passed since last update.

ubuntuにAWS CLIをインストール

Last updated at Posted at 2016-12-03

ちょっとハマったのでメモを。

$ sudo apt-get install python-setuptools
$ sudo easy_install pip
$ sudo pip install awscli

サクサクっと上記のコマンドでインストールを試みたところ以下のエラーが。

〜省略〜

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c ext/_yaml.c -o build/temp.linux-x86_64-2.7/ext/_yaml.o
ext/_yaml.c:4:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-rcDnr_/PyYAML/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-QhFTSP-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-rcDnr_/PyYAML/

Python.hがないとか出てるのでdevelopment kitをインストールしてみる。

$ sudo apt-get install python2.7-dev

再度awscliをインストール。

$ sudo pip install awscli

〜省略〜

Installing collected packages: PyYAML, colorama, awscli
Running setup.py install for PyYAML ... done
Successfully installed PyYAML-3.12 awscli-1.11.23 colorama-0.3.7

正常にインストールできました。
あとはaws configureでIAMユーザなどを設定してあげれば初期設定は完了です。

7
8
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
7
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?