Skip to content

Instantly share code, notes, and snippets.

@Tiryoh
Last active March 2, 2019 12:54
Show Gist options
  • Save Tiryoh/76802a5c6391159f3ce9e22fa088b05a to your computer and use it in GitHub Desktop.
Save Tiryoh/76802a5c6391159f3ce9e22fa088b05a to your computer and use it in GitHub Desktop.
Ubuntu 16.04でapt updateできない不具合に対処するスクリプト https://kledgeb.blogspot.com/2016/05/ubuntu-1604-57.html
#!/usr/bin/env bash
set -eu
[ $(pgrep appstreamcli | wc -l) -gt 0 ] && { echo 'kill process "appstreamcli"'; exit 1; }
mkdir -p /tmp/asfix && cd /tmp/asfix
wget https://launchpad.net/ubuntu/+archive/primary/+files/appstream_0.9.4-1ubuntu1_amd64.deb
wget https://launchpad.net/ubuntu/+archive/primary/+files/libappstream3_0.9.4-1ubuntu1_amd64.deb
sudo dpkg -i *.deb
echo 'Probably fixed. Run "apt update".'
@Tiryoh
Copy link
Author

Tiryoh commented Dec 14, 2018

Usage

run the followings on your terminal:

$ curl -SsfL git.io/fix-appstream-ubuntu16.04 | sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment