re-trigger the post installation script of a package

Asked by Tong Sun

Hi,

I installed a package (docker, http://sfxpt.wordpress.com/2013/11/02/docker-installation/), but something went wrong (dependent package missing) during post installation, so I have to remove the package and re-install it again.

How to re-trigger the post installation script of a package, so that having fixed the (dependent) problem, I don't need to remove and re-install the package again?

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu dpkg Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

uname -a; lsb_release -a

Thanks

Revision history for this message
Tong Sun (suntong001) said :
#2

This is a generic question that isn't tied to any particular releases.

But since you asked, here they are:

$ uname -a; lsb_release -a
Linux vub13R2 3.11.0-13-generic #20-Ubuntu SMP Wed Oct 23 07:38:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.10
Release: 13.10
Codename: saucy

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Why not just run:

sudo apt-get install docker

http://packages.ubuntu.com/search?keywords=docker

It's in the official repos......

Revision history for this message
Tong Sun (suntong001) said :
#4

Thanks but I provide more detailed info about the package only to make it easy to understand. Please don't get side tracked about that particular package.

Again, this is a generic question that isn't tied to any particular releases, or any particular package. The question is about "
re-trigger the post installation script of a package".

If you don't know the answer or what I'm talking about, feel free to ignore it for others to answer.

Thanks

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#5

I think
dpkg --configure packagename
or
dpkg-reconfigure packagename
will do what you want.

excerpt of dpkg manpages:
       --configure package...|-a|--pending
              Configure a package which has been unpacked but not yet
              configured. If -a or --pending is given instead of package, all
              unpacked but unconfigured packages are configured.

              To reconfigure a package which has already been configured, try
              the dpkg-reconfigure(8) command instead.

              Configuring consists of the following steps:

              1. Unpack the conffiles, and at the same time back up the old
              conffiles, so that they can be restored if something goes wrong.

              2. Run postinst script, if provided by the package.

Revision history for this message
Tong Sun (suntong001) said :
#6

Thanks Manfred.