Help us understand the problem. What is going on with this article?

Google Cloud SDKをインストール(CentOS5 & 6)

More than 3 years have passed since last update.
  • Google Cloud SDKではPython2.7が必要だが
  • CentOS6ではpython2.6がインストールされているので2.7をインストールする必要がある。
  • CentOS5でも同様だが少し追加の設定が必要だった

インストール

python2.7インストール

  • CentOS5,6ではpython2.7が入っていないのでインストールして使えるようにする
yum install zlib-devel openssl-devel bzip2-devel
cd /usr/local/src/
wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz
tar xvzf Python-2.7.11.tgz
cd Python-2.7.11
./configure --prefix=/usr/local
make
make altinstall
※バージョンを確認する
python2.7 -V

cd /usr/local/bin/
ln -s -i python2.7 python
ln -s -i python2.7-config python-config
※バージョンを確認する
python -V

※yumコマンドに影響が出ていないか念のため確認

gcloudインストール

  • 使いたいユーザになって
curl https://sdk.cloud.google.com | bash
exec -l $SHELL
gcloud --version

Google Cloud SDK 100.0.0

bq 2.0.18
bq-nix 2.0.18
core 2016.03.04
core-nix 2016.02.05
gcloud 
gsutil 4.17
gsutil-nix 4.15

CentOS5では

$ curl https://sdk.cloud.google.com | bash 

Welcome to the Google Cloud SDK!
  File "/home/ユーザ/google-cloud-sdk/bin/bootstrapping/install.py", line 110
    to_install = (override_components if override_components is not None
                                       ^
SyntaxError: invalid syntax

のようなエラー(python2.4を使ってしまいエラー?)なので

which python2
  /usr/bin/python2
cd /usr/bin/
ln -s -i /usr/local/bin/python2.7 python2

後、再度gcloudインストール

hrix
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした