Unable to reinstall the Couchbase

I’m unable to reinstall the Counchbase(couchbase-server-community_7.2.0-linux_amd64.deb).
It seems uninstall is not correctly done. I have deleted all folders and tmp files for dpkg, still not able to reinstall it. Please help us how to reinstall it.

Systems: Ubuntu 22.04.
CB: couchbase-server-community_7.2.0-linux_amd64.deb and couchbase-release-1.0-amd64.deb

I followed all steps given in the Counchbase document.

machine@machine-System-Product-Name:~$ sudo dpkg -i ./couchbase-server-community_7.2.0-linux_amd64.deb
[sudo] password for machine:
(Reading database … 207604 files and directories currently installed.)
Preparing to unpack …/couchbase-server-community_7.2.0-linux_amd64.deb …
/var/lib/dpkg/info/couchbase-server-community.prerm: 5: /opt/couchbase/bin/install/systemd-ctl: not found
dpkg: warning: old couchbase-server-community package pre-removal script subprocess returned error exit status 127
dpkg: trying script from the new package instead …
/var/lib/dpkg/tmp.ci/prerm: 5: /opt/couchbase/bin/install/systemd-ctl: not found
dpkg: error processing archive ./couchbase-server-community_7.2.0-linux_amd64.deb (–install):
new couchbase-server-community package pre-removal script subprocess returned error exit status 127
Errors were encountered while processing:
./couchbase-server-community_7.2.0-linux_amd64.deb
machine@machine-System-Product-Name:~$

machine@machine-System-Product-Name:~$ sudo dpkg -i ./couchbase-release-1.0-amd64.deb
dpkg: error: cannot access archive ‘./couchbase-release-1.0-amd64.deb’: No such file or directory
machine@machine-System-Product-Name:~$ sudo dpkg -i ./couchbase-release-1.0-6-amd64.deb
(Reading database … 207604 files and directories currently installed.)
Preparing to unpack …/couchbase-release-1.0-6-amd64.deb …
Supported platforms are: Debian/wheezy,jessie,stretch and Ubuntu/precise,trusty,xenial,bionic
dpkg: error processing archive ./couchbase-release-1.0-6-amd64.deb (–install):
new couchbase-release package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
./couchbase-release-1.0-6-amd64.deb
machine@machine-System-Product-Name:~$

Could you try:

sudo dpkg -P couchbase-server-community

before attempting reinstallation?

Note also, dpkg-deb -c couchbase-server-community_7.2.0-linux_amd64.deb
Will list all the files that the package uses, in case something was missed in your cleanup.


Tried with the above comment.

Hi Ianmccloy,


It’s not working.

Sorry for the delay. You can just remove the .prerm file and re-run the dpkg -P. You should then be able to reinstall and the .prerm file will be recreated.

1 Like

Manually removed counchbase.server.community.prerm file and now I’m able to reinstall the CB.

Thank you so much.

Vinoth.R

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.