Reputation: 57771
I'm trying to install the Google Cloud SDK on my Macbook Pro. If I try, following https://cloud.google.com/storage/docs/gsutil_install, to download and run the bash script,
curl https://sdk.cloud.google.com | bash
I get the following error:
For the latest full release notes, please visit:
https://cloud.google.com/sdk/release_notes
╔════════════════════════════════════════════════════════════╗
╠═ Creating update staging area ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: BigQuery Command Line Tool ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: BigQuery Command Line Tool (Platform Spec... ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud SDK Core Libraries (Platform Specific) ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud Storage Command Line Tool ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud Storage Command Line Tool (Platform... ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Default set of gcloud commands ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: gcloud cli dependencies ═╣
ERROR: (gcloud.components.update) The component [gcloud-deps-darwin-x86_64] failed to download.
Alternatively, if I try to install using it using sudo pip install gsutil
, and then try to run it, I get the following error:
Kurts-MacBook-Pro:peek-solutions2 kurtpeek$ gsutil --help
gsutil requires python 2.7.
I still get this error after setting the Python version to 2.7 using pyenv
:
Kurts-MacBook-Pro:peek-solutions2 kurtpeek$ pyenv versions
system
* 2.7 (set by PYENV_VERSION environment variable)
3.6.5
How can I install a working version of gsutil
?
Upvotes: 3
Views: 2861
Reputation: 57771
Following https://cloud.google.com/sdk/docs/quickstart-macos, I downloaded the .tar.gz
file and ran ./google-cloud-sdk/install.sh
, and now it's working:
Kurts-MacBook-Pro:~ kurtpeek$ gsutil --help
Usage: gsutil [-D] [-DD] [-h header]... [-m] [-o] [-q] [command [opts...] args...]
Available commands:
acl Get, set, or change bucket and/or object ACLs
cat Concatenate object content to stdout
compose Concatenate a sequence of objects into a new composite object.
config Obtain credentials and create configuration file
cors Get or set a CORS JSON document for one or more buckets
cp Copy files and objects
defacl Get, set, or change default ACL on buckets
defstorageclass Get or set the default storage class on buckets
du Display object size usage
hash Calculate file hashes
help Get help about commands and topics
iam Get, set, or change bucket and/or object IAM permissions.
kms Configure Cloud KMS encryption
label Get, set, or change the label configuration of a bucket.
lifecycle Get or set lifecycle configuration for a bucket
logging Configure or retrieve logging on buckets
ls List providers, buckets, or objects
mb Make buckets
mv Move/rename objects and/or subdirectories
notification Configure object change notification
perfdiag Run performance diagnostic
rb Remove buckets
requesterpays Enable or disable requester pays for one or more buckets
rewrite Rewrite objects
rm Remove objects
rsync Synchronize content of two buckets/directories
setmeta Set metadata on already uploaded objects
signurl Create a signed url
stat Display object status
test Run gsutil unit/integration tests (for developers)
update Update to the latest gsutil release
version Print version info about gsutil
versioning Enable or suspend versioning for one or more buckets
web Set a main page and/or error page for one or more buckets
Additional help topics:
acls Working With Access Control Lists
anon Accessing Public Data Without Credentials
apis Cloud Storage APIs
crc32c CRC32C and Installing crcmod
creds Credential Types Supporting Various Use Cases
dev Contributing Code to gsutil
encoding Filename encoding and interoperability problems
encryption Using Encryption Keys
metadata Working With Object Metadata
naming Object and Bucket Naming
options Top-Level Command-Line Options
prod Scripting Production Transfers
projects Working With Projects
retries Retry Handling Strategy
security Security and Privacy Considerations
subdirs How Subdirectories Work
support Google Cloud Storage Support
throttling Throttling gsutil
versions Object Versioning and Concurrency Control
wildcards Wildcard Names
Use gsutil help <command or topic> for detailed help.
Upvotes: 3