Upgrading google-cloud-sdk Fails on Configure

試著忘記壹切 提交于 2019-12-06 00:53:40

The direct cause may be a lack of memory. Try to add swap before upgrading.

sudo dd if=/dev/zero of=/var/swap bs=2048 count=524288
sudo chmod 600 /var/swap
sudo mkswap /var/swap
sudo swapon /var/swap
sudo apt upgrade

I encountered the same problem on a Google Compute Engine instance running Ubuntu 16.04, and I was able to resolve it with the following commands:

sudo apt-get remove google-cloud-sdk
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
echo "deb https://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
sudo rm /etc/apt/sources.list.d/partner.list
sudo apt-get install google-cloud-sdk

All I did was apply the autoremove flag and it reinstalled on its own fixing itself. It took forever to run on my small instance but it did finally work.

apt-get autoremove

Since the package was python-dialog that was removed, I'm guessing that was the issue... at least for me. :-)

Edit:

Since my google instance was the smallest one possible, there was not enough memory to complete the task. Once I stopped the web server and all PM2 tasks, it finally finished without errors.

Roberto Bertó

Problem loading gcloud.dns.record-sets.import: 'module' object has no attribute 'CAA'.

Cause:

Older Python Packages installed.

I suppose it is an old dnspython

If you use pip:

pip freeze --local | grep -v '^\-e' | cut -d = -f 1  | xargs -n1 pip install -U

All pip packages will be updated

If you use easy_install you need to check manually

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!