1

I am trying to install gnocchi-api, gnocchi-metricd and python-gnocchiclient with apt-get. I found that the postinst scripts in /var/lib/dpkg/info have some misconfigured ports due to which I cannot install the packages successfully. I wanted to ask if there is a way to change the post-installation scripts nad then re-install the package.

Thanks.

Nehal
  • 11
  • 1

1 Answers1

0

Ideally this kind of problems would be solved by filing a bug report (possibly with a patch) and letting the maintainer upload a fixed version that you can upgrade to.

If you need an immediate local workaround though, you could do the following:

  • Either apt download <package> or dpkg-repack <package> if for example this is a local package only, or the archive does not contain the version you are interested in f.ex.
  • dpkg-deb -R <package_version_arch>.deb bin-dir
  • sensible-editor bin-dir/DEBIAN/postinst
  • sensible-editor bin-dir/DEBIAN/control ideally to bump the version to mark this as a local modification, say by appending +local1 or similar.
  • dpkg-deb -b bin-dir .
  • dpkg -i <package_local-version_arch>.deb
Guillem Jover
  • 2,090
  • 2
  • 11
  • 16