google-cloud-sdk-196.0.0-linux-x86_64を利用して、ローカルサーバのデータをGCSへアップロードしたいのですが、SDKツールのセットアップでgcloud initコマンドが見つからない。という状況になります。
srdcs04% uname -a SunOS srdcs04 5.10 Generic_148889-05 i86pc i386 i86pc srdcs04% env USER=srdcs LOGNAME=srdcs HOME=/export/home/srdcs PATH=/bin:/usr/bin:/usr/ucb:/etc:.:/usr/sfw/bin/gcc:/export/home/srdcs/embulk_test/bin/embulk MAIL=/var/mail//srdcs SHELL=/bin/csh TZ=Japan LANG=ja SSH_CLIENT=xxx.xxx.xxx.xxx 10781 22 SSH_CONNECTION=xxx.xxx.xxx.xxx 10781 10.1.31.75 22 SSH_TTY=/dev/pts/3 TERM=xterm DISPLAY=localhost:11.0 PWD=/export/home/srdcs/google-cloud-sdk-196.0.0-linux-x86_64/google-cloud-sdk/bin HTTP_PROXY=http://xxx.xxx.xxx.xxx:8080 HTTPS_PROXY=http://xxx.xxx.xxx.xxx:8080 EDITOR=vi srdcs04% ls -l /export/home/srdcs/google-cloud-sdk-196.0.0-linux-x86_64/google-cloud-sdk/bin/gcloud -rwxr--r-- 1 srdcs srdcs 3202 3月 22日 12:26 /export/home/srdcs/google-cloud-sdk-196.0.0-linux-x86_64/google-cloud-sdk/bin/gcloud srdcs04% /export/home/srdcs/google-cloud-sdk-196.0.0-linux-x86_64/google-cloud-sdk/bin/gcloud init gcloud: コマンドが見つかりません。
※sdkインストールシェルスクリプト
#!/bin/sh # # Copyright 2013 Google Inc. All Rights Reserved. # echo Welcome to the Google Cloud SDK! # <cloud-sdk-sh-preamble> # # CLOUDSDK_ROOT_DIR (a) installation root dir # CLOUDSDK_PYTHON (u) python interpreter path # CLOUDSDK_PYTHON_ARGS (u) python interpreter arguments # CLOUDSDK_PYTHON_SITEPACKAGES (u) use python site packages # # (a) always defined by the preamble # (u) user definition overrides preamble # Determines the real cloud sdk root dir given the script path. # Would be easier with a portable "readlink -f". _cloudsdk_root_dir() { case $1 in /*) _cloudsdk_path=$1 ;; */*) _cloudsdk_path=$PWD/$1 ;; *) _cloudsdk_path=$(which "$1") case $_cloudsdk_path in /*) ;; *) _cloudsdk_path=$PWD/$_cloudsdk_path ;; esac ;; esac _cloudsdk_dir=0 while : do while _cloudsdk_link=$(readlink "$_cloudsdk_path") do case $_cloudsdk_link in /*) _cloudsdk_path=$_cloudsdk_link ;; *) _cloudsdk_path=$(dirname "$_cloudsdk_path")/$_cloudsdk_link ;; esac done case $_cloudsdk_dir in 1) break ;; esac _cloudsdk_dir=1 _cloudsdk_path=$(dirname "$_cloudsdk_path") done while : do case $_cloudsdk_path in */.) _cloudsdk_path=$(dirname "$_cloudsdk_path") ;; */bin) dirname "$_cloudsdk_path" break ;; *) echo "$_cloudsdk_path" break ;; esac done } CLOUDSDK_ROOT_DIR=$(_cloudsdk_root_dir "$0") # Cloud SDK requires python 2.7 case $CLOUDSDK_PYTHON in *python2*) ;; *python[0-9]*) CLOUDSDK_PYTHON= ;; esac # if CLOUDSDK_PYTHON is empty if [ -z "$CLOUDSDK_PYTHON" ]; then # if python2 exists then plain python may point to a version != 2 if which python2 >/dev/null; then CLOUDSDK_PYTHON=python2 elif which python2.7 >/dev/null; then # this is what some OS X versions call their built-in Python CLOUDSDK_PYTHON=python2.7 else CLOUDSDK_PYTHON=python fi fi # if CLOUDSDK_PYTHON_SITEPACKAGES and VIRTUAL_ENV are empty case :$CLOUDSDK_PYTHON_SITEPACKAGES:$VIRTUAL_ENV: in :::) # add -S to CLOUDSDK_PYTHON_ARGS if not already there case " $CLOUDSDK_PYTHON_ARGS " in *" -S "*) ;; " ") CLOUDSDK_PYTHON_ARGS="-S" ;; *) CLOUDSDK_PYTHON_ARGS="$CLOUDSDK_PYTHON_ARGS -S" ;; esac unset CLOUDSDK_PYTHON_SITEPACKAGES ;; *) # remove -S from CLOUDSDK_PYTHON_ARGS if already there while :; do case " $CLOUDSDK_PYTHON_ARGS " in *" -S "*) CLOUDSDK_PYTHON_ARGS=${CLOUDSDK_PYTHON_ARGS%%-S*}' '${CLOUDSDK_PYTHON_ARGS#*-S} ;; *) break ;; esac done # if CLOUDSDK_PYTHON_SITEPACKAGES is empty [ -z "$CLOUDSDK_PYTHON_SITEPACKAGES" ] && CLOUDSDK_PYTHON_SITEPACKAGES=1 export CLOUDSDK_PYTHON_SITEPACKAGES ;; esac export CLOUDSDK_ROOT_DIR CLOUDSDK_PYTHON_ARGS # </cloud-sdk-sh-preamble> if [ -z "$CLOUDSDK_PYTHON" ]; then if [ -z "$(which python)" ]; then echo echo "To use the Google Cloud SDK, you must have Python installed and on your PATH." echo "As an alternative, you may also set the CLOUDSDK_PYTHON environment variable" echo "to the location of your Python executable." exit 1 fi fi # Warns user if they are running as root. if [ $(id -u) = 0 ]; then echo "WARNING: You appear to be running this script as root. This may cause " echo "the installation to be inaccessible to users other than the root user." fi "$CLOUDSDK_PYTHON" $CLOUDSDK_PYTHON_ARGS "${CLOUDSDK_ROOT_DIR}/bin/bootstrapping/install.py" "$@"
回答1件
あなたの回答
tips
プレビュー