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 precise-security Release.gpg [198 B]Get:2 precise-security Release [49.6 kB]Get:3 precise-security/main Sources [93.6 kB]Hit precise Release.gpgHit precise-updates Release.gpgHit precise-backports Release.gpgHit precise ReleaseHit precise-updates ReleaseGet:4 precise Release.gpg [72 B]Hit precise-backports ReleaseHit precise ReleaseHit precise/main SourcesHit precise/restricted SourcesHit precise/universe SourcesHit precise/multiverse SourcesHit precise/main amd64 PackagesHit precise/restricted amd64 PackagesHit precise/universe amd64 PackagesHit precise/multiverse amd64 PackagesHit precise/main i386 PackagesHit precise/restricted i386 PackagesHit precise/universe i386 PackagesHit precise/multiverse i386 PackagesHit precise/main TranslationIndexHit precise/multiverse TranslationIndexHit precise/restricted TranslationIndexHit precise/main SourcesHit precise/universe TranslationIndexHit precise-updates/main SourcesHit precise-updates/restricted SourcesHit precise-updates/universe SourcesHit precise-updates/multiverse SourcesHit precise-updates/main amd64 PackagesHit precise/main amd64 PackagesHit precise/main i386 PackagesIgn precise/main TranslationIndexHit precise-updates/restricted amd64 PackagesHit precise-updates/universe amd64 PackagesHit precise-updates/multiverse amd64 PackagesHit precise-updates/main i386 PackagesHit precise-updates/restricted i386 PackagesHit precise-updates/universe i386 PackagesHit precise-updates/multiverse i386 PackagesHit precise-updates/main TranslationIndexHit precise-updates/multiverse TranslationIndexGet:5 precise-security/restricted Sources [2,494 B]Get:6 precise-security/universe Sources [29.9 kB]Hit precise-updates/restricted TranslationIndexHit precise-updates/universe TranslationIndexHit precise-backports/main SourcesHit precise-backports/restricted SourcesHit precise-backports/universe SourcesHit precise-backports/multiverse SourcesHit precise-backports/main amd64 PackagesHit precise-backports/restricted amd64 PackagesHit precise-backports/universe amd64 PackagesHit precise-backports/multiverse amd64 PackagesHit precise-backports/main i386 PackagesHit precise-backports/restricted i386 PackagesHit precise-backports/universe i386 PackagesHit precise-backports/multiverse i386 PackagesHit precise-backports/main TranslationIndexHit precise-backports/multiverse TranslationIndexHit precise-backports/restricted TranslationIndexHit precise-backports/universe TranslationIndexHit precise/main Translation-enHit precise/multiverse Translation-enHit precise/restricted Translation-enHit precise/universe Translation-enHit precise-updates/main Translation-enGet:7 precise-security/multiverse Sources [1,797 B]Get:8 precise-security/main amd64 Packages [347 kB]Hit precise-updates/multiverse Translation-enHit precise-updates/restricted Translation-enHit precise-updates/universe Translation-enHit precise-backports/main Translation-enHit precise-backports/multiverse Translation-enHit precise-backports/restricted Translation-enHit precise-backports/universe Translation-enIgn precise/main Translation-en_USIgn precise/main Translation-enGet:9 precise-security/restricted amd64 Packages [4,627 B]Get:10 precise-security/universe amd64 Packages [85.4 kB]Get:11 precise-security/multiverse amd64 Packages [2,439 B]Get:12 precise-security/main i386 Packages [366 kB]Get:13 precise-security/restricted i386 Packages [4,620 B]Get:14 precise-security/universe i386 Packages [89.5 kB]Get:15 precise-security/multiverse i386 Packages [2,635 B]Hit precise-security/main TranslationIndexHit precise-security/multiverse TranslationIndexHit precise-security/restricted TranslationIndexHit precise-security/universe TranslationIndexHit precise-security/main Translation-enHit precise-security/multiverse Translation-enHit precise-security/restricted Translation-enHit 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 for how to upgrade to# newer versions of the distribution.deb precise main restricteddeb-src precise main restricted## Major bug fix updates produced after the final release of the## distribution.deb precise-updates main restricteddeb-src 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 precise universedeb-src precise universedeb precise-updates universedeb-src 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 precise multiversedeb-src precise multiversedeb precise-updates multiversedeb-src 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 precise-backports main restricted universe multiversedeb-src precise-backports main restricted universe multiversedeb precise-security main restricteddeb-src precise-security main restricteddeb precise-security universedeb-src precise-security universedeb precise-security multiversedeb-src 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 precise partner# deb-src precise partner## This software is not part of Ubuntu, but is offered by third-party## developers who want to ship their latest software.deb precise maindeb-src 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/9.5/main/pg_hba.confsudo pg_ctlcluster 9.5 main reload