Skip to content

Instantly share code, notes, and snippets.

@udoprog
Last active December 16, 2015 17:19
Show Gist options
  • Save udoprog/5469875 to your computer and use it in GitHub Desktop.
Save udoprog/5469875 to your computer and use it in GitHub Desktop.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
dependent-dummy : Depends: dependency-dummy (= 1) but 2 is to be installed
E: Broken packages
#!/bin/sh
REPO=/var/local-repo
sudo mkdir $REPO
cat - > dependency-1 << ENDL
Section: misc
Priority: optional
Standards-Version: 3.6.2
Package: dependency-dummy
Version: 1
ENDL
cat - > dependency-2 << ENDL
Section: misc
Priority: optional
Standards-Version: 3.6.2
Package: dependency-dummy
Version: 2
ENDL
cat - > dependent-1 << ENDL
Section: misc
Priority: optional
Standards-Version: 3.6.2
Package: dependent-dummy
Version: 1
Depends: dependency-dummy (= 1)
ENDL
equivs-build dependency-1
equivs-build dependency-2
equivs-build dependent-1
sudo cp *.deb $REPO
dpkg-scanpackages -m $REPO | sudo tee $REPO/Packages > /dev/null
echo "Add the following to your sources.list:"
echo "deb file:$REPO ./"
echo "Next try: "
echo "apt-get update; apt-get install dependent-dummy"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment