Pg_ctl: команда не найдена, в каком пакете есть эта команда?

Я установил pgadmin с помощью ubuntu software center и пытаюсь получить доступ к локальной базе данных (недавно загруженной из Интернета). Я попытался запустить команду pg_ctl (запущенную как postgres), однако это приводит к ошибке command not found.Я также выполнил следующие команды:

echo $PATH: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games 

так что это немного странное место, но все же.whereis pg_ctl: pg_ctl: /usr/share/man/man1/pg_ctl.1.gz type pg_ctl: -su: так что это где-то в моей системе type: pg_ctl: not found что выглядит неправильно

apt-cache policy postgres-xc дает мне No such file or directory ошибка в выводе

sudo apt-get install postgres-xc является

Reading package lists... DoneBuilding dependency tree       Reading state information... DoneE: Unable to locate package postgres-xc

обновление sudo apt-get -q дает мне :

Get:1 http://security.ubuntu.com precise-security Release.gpg [198 B]Get:2 http://security.ubuntu.com precise-security Release [49.6 kB]Get:3 http://security.ubuntu.com precise-security/main Sources [93.6 kB]Hit http://nl.archive.ubuntu.com precise Release.gpgHit http://nl.archive.ubuntu.com precise-updates Release.gpgHit http://nl.archive.ubuntu.com precise-backports Release.gpgHit http://nl.archive.ubuntu.com precise ReleaseHit http://nl.archive.ubuntu.com precise-updates ReleaseGet:4 http://extras.ubuntu.com precise Release.gpg [72 B]Hit http://nl.archive.ubuntu.com precise-backports ReleaseHit http://extras.ubuntu.com precise ReleaseHit http://nl.archive.ubuntu.com precise/main SourcesHit http://nl.archive.ubuntu.com precise/restricted SourcesHit http://nl.archive.ubuntu.com precise/universe SourcesHit http://nl.archive.ubuntu.com precise/multiverse SourcesHit http://nl.archive.ubuntu.com precise/main amd64 PackagesHit http://nl.archive.ubuntu.com precise/restricted amd64 PackagesHit http://nl.archive.ubuntu.com precise/universe amd64 PackagesHit http://nl.archive.ubuntu.com precise/multiverse amd64 PackagesHit http://nl.archive.ubuntu.com precise/main i386 PackagesHit http://nl.archive.ubuntu.com precise/restricted i386 PackagesHit http://nl.archive.ubuntu.com precise/universe i386 PackagesHit http://nl.archive.ubuntu.com precise/multiverse i386 PackagesHit http://nl.archive.ubuntu.com precise/main TranslationIndexHit http://nl.archive.ubuntu.com precise/multiverse TranslationIndexHit http://nl.archive.ubuntu.com precise/restricted TranslationIndexHit http://extras.ubuntu.com precise/main SourcesHit http://nl.archive.ubuntu.com precise/universe TranslationIndexHit http://nl.archive.ubuntu.com precise-updates/main SourcesHit http://nl.archive.ubuntu.com precise-updates/restricted SourcesHit http://nl.archive.ubuntu.com precise-updates/universe SourcesHit http://nl.archive.ubuntu.com precise-updates/multiverse SourcesHit http://nl.archive.ubuntu.com precise-updates/main amd64 PackagesHit http://extras.ubuntu.com precise/main amd64 PackagesHit http://extras.ubuntu.com precise/main i386 PackagesIgn http://extras.ubuntu.com precise/main TranslationIndexHit http://nl.archive.ubuntu.com precise-updates/restricted amd64 PackagesHit http://nl.archive.ubuntu.com precise-updates/universe amd64 PackagesHit http://nl.archive.ubuntu.com precise-updates/multiverse amd64 PackagesHit http://nl.archive.ubuntu.com precise-updates/main i386 PackagesHit http://nl.archive.ubuntu.com precise-updates/restricted i386 PackagesHit http://nl.archive.ubuntu.com precise-updates/universe i386 PackagesHit http://nl.archive.ubuntu.com precise-updates/multiverse i386 PackagesHit http://nl.archive.ubuntu.com precise-updates/main TranslationIndexHit http://nl.archive.ubuntu.com precise-updates/multiverse TranslationIndexGet:5 http://security.ubuntu.com precise-security/restricted Sources [2,494 B]Get:6 http://security.ubuntu.com precise-security/universe Sources [29.9 kB]Hit http://nl.archive.ubuntu.com precise-updates/restricted TranslationIndexHit http://nl.archive.ubuntu.com precise-updates/universe TranslationIndexHit http://nl.archive.ubuntu.com precise-backports/main SourcesHit http://nl.archive.ubuntu.com precise-backports/restricted SourcesHit http://nl.archive.ubuntu.com precise-backports/universe SourcesHit http://nl.archive.ubuntu.com precise-backports/multiverse SourcesHit http://nl.archive.ubuntu.com precise-backports/main amd64 PackagesHit http://nl.archive.ubuntu.com precise-backports/restricted amd64 PackagesHit http://nl.archive.ubuntu.com precise-backports/universe amd64 PackagesHit http://nl.archive.ubuntu.com precise-backports/multiverse amd64 PackagesHit http://nl.archive.ubuntu.com precise-backports/main i386 PackagesHit http://nl.archive.ubuntu.com precise-backports/restricted i386 PackagesHit http://nl.archive.ubuntu.com precise-backports/universe i386 PackagesHit http://nl.archive.ubuntu.com precise-backports/multiverse i386 PackagesHit http://nl.archive.ubuntu.com precise-backports/main TranslationIndexHit http://nl.archive.ubuntu.com precise-backports/multiverse TranslationIndexHit http://nl.archive.ubuntu.com precise-backports/restricted TranslationIndexHit http://nl.archive.ubuntu.com precise-backports/universe TranslationIndexHit http://nl.archive.ubuntu.com precise/main Translation-enHit http://nl.archive.ubuntu.com precise/multiverse Translation-enHit http://nl.archive.ubuntu.com precise/restricted Translation-enHit http://nl.archive.ubuntu.com precise/universe Translation-enHit http://nl.archive.ubuntu.com precise-updates/main Translation-enGet:7 http://security.ubuntu.com precise-security/multiverse Sources [1,797 B]Get:8 http://security.ubuntu.com precise-security/main amd64 Packages [347 kB]Hit http://nl.archive.ubuntu.com precise-updates/multiverse Translation-enHit http://nl.archive.ubuntu.com precise-updates/restricted Translation-enHit http://nl.archive.ubuntu.com precise-updates/universe Translation-enHit http://nl.archive.ubuntu.com precise-backports/main Translation-enHit http://nl.archive.ubuntu.com precise-backports/multiverse Translation-enHit http://nl.archive.ubuntu.com precise-backports/restricted Translation-enHit http://nl.archive.ubuntu.com precise-backports/universe Translation-enIgn http://extras.ubuntu.com precise/main Translation-en_USIgn http://extras.ubuntu.com precise/main Translation-enGet:9 http://security.ubuntu.com precise-security/restricted amd64 Packages [4,627 B]Get:10 http://security.ubuntu.com precise-security/universe amd64 Packages [85.4 kB]Get:11 http://security.ubuntu.com precise-security/multiverse amd64 Packages [2,439 B]Get:12 http://security.ubuntu.com precise-security/main i386 Packages [366 kB]Get:13 http://security.ubuntu.com precise-security/restricted i386 Packages [4,620 B]Get:14 http://security.ubuntu.com precise-security/universe i386 Packages [89.5 kB]Get:15 http://security.ubuntu.com precise-security/multiverse i386 Packages [2,635 B]Hit http://security.ubuntu.com precise-security/main TranslationIndexHit http://security.ubuntu.com precise-security/multiverse TranslationIndexHit http://security.ubuntu.com precise-security/restricted TranslationIndexHit http://security.ubuntu.com precise-security/universe TranslationIndexHit http://security.ubuntu.com precise-security/main Translation-enHit http://security.ubuntu.com precise-security/multiverse Translation-enHit http://security.ubuntu.com precise-security/restricted Translation-enHit http://security.ubuntu.com precise-security/universe Translation-enFetched 1,081 kB in 0s (1,561 kB/s)

cat /etc/apt/sources.список дает мне :

#deb cdrom:[Ubuntu 12.04.3 LTS _Precise Pangolin_ - Release amd64 (20130820.1)]/ dists/precise/main/binary-i386/#deb cdrom:[Ubuntu 12.04.3 LTS _Precise Pangolin_ - Release amd64 (20130820.1)]/ dists/precise/restricted/binary-i386/#deb cdrom:[Ubuntu 12.04.3 LTS _Precise Pangolin_ - Release amd64 (20130820.1)]/ precise main restricted# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to# newer versions of the distribution.deb http://nl.archive.ubuntu.com/ubuntu/ precise main restricteddeb-src http://nl.archive.ubuntu.com/ubuntu/ precise main restricted## Major bug fix updates produced after the final release of the## distribution.deb http://nl.archive.ubuntu.com/ubuntu/ precise-updates main restricteddeb-src http://nl.archive.ubuntu.com/ubuntu/ precise-updates main restricted## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu## team. Also, please note that software in universe WILL NOT receive any## review or updates from the Ubuntu security team.deb http://nl.archive.ubuntu.com/ubuntu/ precise universedeb-src http://nl.archive.ubuntu.com/ubuntu/ precise universedeb http://nl.archive.ubuntu.com/ubuntu/ precise-updates universedeb-src http://nl.archive.ubuntu.com/ubuntu/ precise-updates universe## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu## security team.deb http://nl.archive.ubuntu.com/ubuntu/ precise multiversedeb-src http://nl.archive.ubuntu.com/ubuntu/ precise multiversedeb http://nl.archive.ubuntu.com/ubuntu/ precise-updates multiversedeb-src http://nl.archive.ubuntu.com/ubuntu/ precise-updates multiverse## N.B. software from this repository may not have been tested as## extensively as that contained in the main release, although it includes## newer versions of some applications which may provide useful features.## Also, please note that software in backports WILL NOT receive any review## or updates from the Ubuntu security team.deb http://nl.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiversedeb-src http://nl.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiversedeb http://security.ubuntu.com/ubuntu precise-security main restricteddeb-src http://security.ubuntu.com/ubuntu precise-security main restricteddeb http://security.ubuntu.com/ubuntu precise-security universedeb-src http://security.ubuntu.com/ubuntu precise-security universedeb http://security.ubuntu.com/ubuntu precise-security multiversedeb-src http://security.ubuntu.com/ubuntu precise-security multiverse## Uncomment the following two lines to add software from Canonical's## 'partner' repository.## This software is not part of Ubuntu, but is offered by Canonical and the## respective vendors as a service to Ubuntu users.# deb http://archive.canonical.com/ubuntu precise partner# deb-src http://archive.canonical.com/ubuntu precise partner## This software is not part of Ubuntu, but is offered by third-party## developers who want to ship their latest software.deb http://extras.ubuntu.com/ubuntu precise maindeb-src http://extras.ubuntu.com/ubuntu precise main

Тебе не следует убегать pg_ctl непосредственно под Ubuntu/Debian. Воспользуйся pg_ctlcluster вместо этого, который устанавливается с помощью postgresql-common. Документацию см. на его справочной странице.

Вы должны отредактировать свой путь:

$ cd ~$ vim .profilePATH=$PATH:/usr/lib/postgresql/{version}/binexport PATH$ . ~/.profile

Заменять {version} с правильным номером версии.

И теперь вы можете выполнить команду из командной оболочки:

pg_ctl --helppg_ctl is a utility to initialize, start, stop, or control a PostgreSQL server.

используйте этот код:

sudo pg_ctlcluster 'cluster_version' 'cluster-name' 'action'

где:

/etc/postgresql/**cluster-version**/**cluster-name**/start.conf

где действие:

start|stop|restart|reload|status|promote

пример моего кода:

/etc/postgresql/9.5/main/pg_hba.confsudo pg_ctlcluster 9.5 main reload