Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting started instructions fail at "sudo apt-get install google-cloud-sdk" #31

Open
destijl opened this issue Aug 22, 2023 · 6 comments

Comments

@destijl
Copy link

destijl commented Aug 22, 2023

Step 6 in the getting started instructions fails due to google-cloud-sdk trying to overwrite a LICENSE file installed by google-cloud-cli. This seems like it probably isn't your problem, I think you'll have to go chase the SDK folks to get it fixed.

$ sudo apt-get install google-cloud-sdk
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  google-cloud-sdk-app-engine-java google-cloud-sdk-app-engine-python google-cloud-sdk-pubsub-emulator google-cloud-sdk-bigtable-emulator google-cloud-sdk-datastore-emulator
The following NEW packages will be installed:
  google-cloud-sdk
0 upgraded, 1 newly installed, 0 to remove and 21 not upgraded.
Need to get 0 B/153 MB of archives.
After this operation, 755 MB of additional disk space will be used.
(Reading database ... 138034 files and directories currently installed.)
Preparing to unpack .../google-cloud-sdk_444.0.0-0_all.deb ...
Unpacking google-cloud-sdk (444.0.0-0) ...
dpkg: error processing archive /var/cache/apt/archives/google-cloud-sdk_444.0.0-0_all.deb (--unpack):
 trying to overwrite '/usr/share/google-cloud-sdk/LICENSE', which is also in package google-cloud-cli 438.0.0-0
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/google-cloud-sdk_444.0.0-0_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried apt-get update and apt-get upgrade which got me to cli version 444, but that had the same problem:

$ sudo apt-get install google-cloud-sdk
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  google-cloud-sdk-app-engine-java google-cloud-sdk-app-engine-python google-cloud-sdk-pubsub-emulator google-cloud-sdk-bigtable-emulator google-cloud-sdk-datastore-emulator
The following NEW packages will be installed:
  google-cloud-sdk
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/153 MB of archives.
After this operation, 755 MB of additional disk space will be used.
(Reading database ... 138797 files and directories currently installed.)
Preparing to unpack .../google-cloud-sdk_444.0.0-0_all.deb ...
Unpacking google-cloud-sdk (444.0.0-0) ...
dpkg: error processing archive /var/cache/apt/archives/google-cloud-sdk_444.0.0-0_all.deb (--unpack):
 trying to overwrite '/usr/share/google-cloud-sdk/LICENSE', which is also in package google-cloud-cli 444.0.0-0
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/google-cloud-sdk_444.0.0-0_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
@yuangu002
Copy link

+1

@Proxitrone
Copy link

+1 Similar error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  google-cloud-sdk
Suggested packages:
  google-cloud-sdk-app-engine-java google-cloud-sdk-app-engine-python google-cloud-sdk-pubsub-emulator google-cloud-sdk-bigtable-emulator google-cloud-sdk-datastore-emulator
The following NEW packages will be installed:
  google-cloud-sdk google-cloud-sdk-cloud-run-proxy
0 upgraded, 2 newly installed, 0 to remove and 13 not upgraded.
Need to get 159 MB of archives.
After this operation, 778 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://packages.cloud.google.com/apt cloud-sdk-buster/main amd64 google-cloud-sdk all 445.0.0-0 [153 MB]
Get:2 http://packages.cloud.google.com/apt cloud-sdk-buster/main amd64 google-cloud-sdk-cloud-run-proxy amd64 445.0.0-0 [5809 kB]
Fetched 159 MB in 3s (56.1 MB/s)                           
Selecting previously unselected package google-cloud-sdk.
(Reading database ... 138144 files and directories currently installed.)
Preparing to unpack .../google-cloud-sdk_445.0.0-0_all.deb ...
Unpacking google-cloud-sdk (445.0.0-0) ...
dpkg: error processing archive /var/cache/apt/archives/google-cloud-sdk_445.0.0-0_all.deb (--unpack):
 trying to overwrite '/usr/lib/google-cloud-sdk/platform/anthoscli_licenses/lib.zip', which is also in package google-cloud-cli 426.0.0-0
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Selecting previously unselected package google-cloud-sdk-cloud-run-proxy.
Preparing to unpack .../google-cloud-sdk-cloud-run-proxy_445.0.0-0_amd64.deb ...
Unpacking google-cloud-sdk-cloud-run-proxy (445.0.0-0) ...
Errors were encountered while processing:
 /var/cache/apt/archives/google-cloud-sdk_445.0.0-0_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)```

@omarcoscardoso
Copy link

+1

1 similar comment
@kree-alltold
Copy link

+1

@jlenuffgsoi
Copy link

I encounter the same issue.

After a successful sudo apt update and sudo apt upgrade, I have this error :

$ sudo apt install google-cloud-sdk-cloud-run-proxy
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  google-cloud-sdk
Suggested packages:
  google-cloud-sdk-app-engine-java google-cloud-sdk-app-engine-python google-cloud-sdk-pubsub-emulator google-cloud-sdk-bigtable-emulator google-cloud-sdk-datastore-emulator
The following NEW packages will be installed:
  google-cloud-sdk google-cloud-sdk-cloud-run-proxy
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/166 MB of archives.
After this operation, 826 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
(Reading database ... 66561 files and directories currently installed.)
Preparing to unpack .../google-cloud-sdk_455.0.0-0_all.deb ...

Progress: [  0%] [........................................................................................................................................................................................................................] 
Unpacking google-cloud-sdk (455.0.0-0) ...................................................................................................................................................................................................] 
dpkg: error processing archive /var/cache/apt/archives/google-cloud-sdk_455.0.0-0_all.deb (--unpack):
 trying to overwrite '/usr/share/google-cloud-sdk/README', which is also in package google-cloud-cli 455.0.0-0
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Selecting previously unselected package google-cloud-sdk-cloud-run-proxy.
Preparing to unpack .../google-cloud-sdk-cloud-run-proxy_455.0.0-0_amd64.deb ...

Unpacking google-cloud-sdk-cloud-run-proxy (455.0.0-0) ...#######.........................................................................................................................................................................] 

Errors were encountered while processing:################################################.................................................................................................................................................] 
 /var/cache/apt/archives/google-cloud-sdk_455.0.0-0_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

@itayrav
Copy link

itayrav commented Jan 2, 2024

Adding the flag -o 'Dpkg::Options::="--force-overwrite"' did the trick for me.
Please use this with caution however, as it overwrites all files that exist in both packages, and it might cause some weird behavior for either google-cloud-sdk or google-cloud-cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants