I'm trying to install PostgreSQL onto Ubuntu 14.04, but I am having difficulties after following a guide - postgresql

I originally followed the guide at http://www.postgresql.org/docs/9.3/static/runtime.html. It instructed me to install postgres-xc, which is meant for making clusters of databases. On other sites, I was instructed to use the postgres-9.3 package (or 9.x) instead of the postgres-xc package. One inconsistency I noticed was that arguments such as --nodename were missing from the original guide, which led me to believe there was an issue with the original guide
I have uninstalled postgres-xc using both apt-get remove --purge postgres-xc and dpkg remove --purge postgres-xc, as advised by others, as well as following this solution, which involves changing postgres-xc.prerm so that it exits early on.
Additionally, I have uninstalled and reinstalled the postgresql-package many times and also run sudo apt-get install postgresql postgresql-contrib and sudo apt-get install postgresql-9.3 postgresql-contrib-9.3. I have done this after uninstalling other version. When I try running the postgres command in Bash, I get the following error:
The program 'postgres' is currently not installed. You can install it by typing:
sudo apt-get install postgres-xc
I've been trying to get this to work for a while, but nothing has worked so far. The only binary for PostgreSQL I can use is psql, which is just a dynamic session for it (and I want to set up a server).

Related

PostgreSQL installation hangs after password prompt

I am trying to install PostgreSQL on an AWS cloud CPU instance (instance type: c5.24xlarge, Ubuntu 20.04 LTS).
I have tried both sudo apt install postgresql postgresql-contrib, as well as installing from the apt repository mentioned in the official documentation.
However, in both cases the installation keeps freezing at this point:
Setting up postgresql-common (247.pgdg20.04+1) ...
Password:
Here after I enter a password and press enter, nothing happens and the installation seems to be stuck.
Then if I cancel via Ctrl+C or Ctrl+D, it blocks any further installations and I need to kill all apt and dpkg processes, delete the dpkg lock files, and purge postgresql from my system before trying again.
I have been stuck on this for a while...is there any way to fix this issue and install postgresql? Thanks

Can't install powershell in Parallels Kali Linux Virtual Machine

I've been trying to install Powershell for a few hours now. I run this under root:
apt update && apt -y install powershell
This is what I end up getting after it runs through and seemingly downloads
Package powershell is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'powershell' has no installation candidate
When I try to run this same command outside of root using sudo, I get the following:
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
I have updated everything and tried a few different ways. I even downloaded a completely new Virtual Machine in Parallels to see if restarting would help out. I still run into the same problems. This is a Kali Linux VM on Parallels MacOS M1. Not sure if that matters or not. I think Parallels itself may possibly be using an apt process in the background, but when I do:
sudo killall apt apt-get
I end up getting
apt: no process found
apt-get: no process found
I've been trying everything. I'm on a new Mac so I don't have too many VM options. If someone could figure this out in Parallels, it would be a great help.
I've tried a lot. In the description above.
To install PowerShell in Kali Linux open the terminal and type:
sudo apt update
sudo apt install -y snapd # install daemon and tooling that enable snap packages
sudo systemctl enable --now snapd apparmor
Log out and back in again, and run the following command to install the powershell snap package.
sudo snap install powershell --classic

uninstall github desktop from ubuntu

Uninstall GitHub Desktop from Ubuntu
How can I remove my github dektop app. It is not working perfectly, so I want to uninstall and re-install it.
Here is the command that produces an error:
sudo apt-get remove GitHub Desktop
sudo apt remove github-desktop
There are 2 ways or i should say 2 commands :
sudo apt remove github-desktop
will remove the binaries, but not the configuration or data files of the package
sudo apt remove --purge github-desktop
will remove about everything regarding the package packagename, [...]
Particularly useful when you want to 'start all over' with an application because you messed up the configuration.

I have several Postgresql versions. How can I make sure it runs the one I need&

I have three versions of PG install on may Ubuntu 20.04:
/usr/lib/postgresql/12/bin/postgres
/usr/lib/postgresql/13/bin/postgres
/usr/lib/postgresql/9.6/bin/postgres
However, I only need one of them -- 9.6. Is there a way to choose version, like we choose with rvm, for example? Or should I destroy the versions I don't need?
I have tried to run this command sudo apt-get install postgresql-9.6 postgresql-contrib but it still installs the 13 version.
And when I check for version with sudo -u postgres psql, SELECT version(); it shows me 13th versions.
Solved it! :)
sudo apt-get install postgresql-9.6 postgresql-contrib-9.6 did the trick, it installed only 9.6 version.

Install packages during uck Ubuntu customization

I am following the steps from this website to customize my Ubuntu image. After unpacking the clean .iso I add some files to the "remaster" and also I would like to install some apps (wireshark for example), so when the systems boots with the custom image, there is no need to install anything. I run the following script:
sudo uck-remaster-clean
sudo uck-remaster-unpack-iso my.iso
sudo uck-remaster-unpack-rootfs
// .. add desired files to the remaster
sudo apt-get install wireshark
sudo uck-remaster-pack-rootfs -c
sudo uck-remaster-pack-iso -g myNew.iso
However, wireshark is installed on the machine on which I am running the script, not in the remaster-root system. What do I need to modify to have the apps installed on the unpacked ISO? Is it even possible?
You skipped a step, you need to sudo uck-remaster-chroot-rootfs before.
Now you can install packages with apt-get and perform all kinds of customizations.