Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 如何在ubuntu上从源代码安装postgres?_Linux_Postgresql_Ubuntu - Fatal编程技术网

Linux 如何在ubuntu上从源代码安装postgres?

Linux 如何在ubuntu上从源代码安装postgres?,linux,postgresql,ubuntu,Linux,Postgresql,Ubuntu,我遵循以下步骤 澄清 /配置 sudo制作安装 显示--> 但是如果输入psql 说--> 我不想从apt get install安装只想从源代码安装所有内容通常,不带选项的/configure将在/usr/local/中安装产品,这可能不在您的路径中。您能检查一下psql是否存在于/usr/local/bin/中吗?如果是这样,您可以键入该路径的完整路径或将/usr/local/bin/添加到您的路径中。默认情况下,PostgreSQL安装在/usr/local/pgsql中,因此您可以为命令

我遵循以下步骤

  • 澄清

  • /配置

  • sudo制作安装

  • 显示-->

    但是如果输入psql 说-->


    我不想从apt get install安装只想从源代码安装所有内容通常,不带选项的
    /configure
    将在
    /usr/local/
    中安装产品,这可能不在您的
    路径中。您能检查一下
    psql
    是否存在于
    /usr/local/bin/
    中吗?如果是这样,您可以键入该路径的完整路径或将
    /usr/local/bin/
    添加到您的路径中。

    默认情况下,PostgreSQL安装在
    /usr/local/pgsql
    中,因此您可以为命令行客户端键入
    /usr/local/pgsql/bin/psql
    (但请记住,您必须首先使用
    initdb
    first`创建并启动一个数据库集群)

    如果您不喜欢该位置,请使用
    配置
    前缀
    选项:

    ./configure prefix=/dir/where/you/want/postgres
    

    @Laurenz Albe
    如何执行initdb?它给出了以下错误------>initdb:未指定数据目录您必须标识此数据库系统的数据将驻留的目录。使用调用选项-D或环境变量PGDATAPlease read执行此操作。这是基本内容。
    Command 'psql' not found, but can be installed with:
    
    apt install postgresql-client-common
    Please ask your administrator.
    
    ./configure prefix=/dir/where/you/want/postgres