Category: repository

Xubuntu: how to create a local repository

I had the necessity to create a local repository in order to handle the upgrade of local packages, as if they were from official repositories.
Create your own repository folder

sudo su
mkdir /usr/local/packages

Create and edit the script file which will upgrade the packages’ list every time we add a new one

# open each .deb file and create a zipped list file
CMD="dpkg-scanpackages $DIR | gzip > $DIR/Packages.gz"

eval $CMD
chmod +x

Update /etc/apt/source.list with the new location

echo "deb file:/usr/local packages" >> /etc/apt/source.list

Copy your packages into the folder and run the script


Now you can install/remove/manage your local packages using command line or through Synaptic

Unable to lock the administration directory (/var/lib/dpkg/)

I was upgrading my Xubuntu 11.10 with

sudo apt-get upgrade

when the ssh connection dropped. At the next login I did again the same command but got “Unable to lock the administration directory (/var/lib/dpkg/)“.

So, get confirm the update is still running

ps aux | grep dpkg

and see its ID (second column from left), in my case was 4497, then kill the upgrade process

sudo kill 4497

Configure again the packages previously updated

sudo dpkg --configure -a

Wait for until the end of the process and complete the update with the usual

sudo apt-get update


Install correctly Medibuntu repository

I was doing some experiments writing scripts to convert videos for my Android phone when I had to install the Medibuntu repository.

I found the official instructions here but after the update I got

$ W: GPG error: maverick Release:
The following signatures couldn't be verified because the public key is not available:

I found also the following command but unfortunately with the same result:

$ wget -q -O- | sudo apt-key add -

Looking around on forums I found out the right link where to download the GPG key and it worked for me on Ubuntu 10.10.

$ wget -q -O- | sudo apt-key add -

Add Google repository to Ubuntu 10.10 Maverick

I had to install some Google applications, hence why I had to add its repository.

$ sudo nano /etc/apt/sources.list

and add

deb stable non-free

Import the public key

$ wget -q
$ sudo apt-key add

Update the cache and your are ready to install your Google applications

$ sudo apt-get update

WordPress Themes