postgresql 配置:错误:C编译器无法在Ubuntu中创建可执行文件

osh3o9ms  于 2023-03-12  发布在  PostgreSQL
关注(0)|答案(3)|浏览(259)

我在尝试安装postgresql时遇到此错误
终端截图

这是我第二次尝试安装postgresql来使用Apache/Age扩展,它在我的Arch Linux上运行正常,但在Ubuntu上却不行。
它发生:

checking host system type... x86_64-pc-linux-gnu
checking which template to use... linux
checking whether NLS is wanted... no
checking for default port number... 5432
checking for block size... 8kB
checking for segment size... 1GB
checking for WAL block size... 8kB
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/marcos/postgresql-11.18/postgresql-11.18':
configure: error: C compiler cannot create executables
See `config.log' for more details```

I expected the informations about the compilation with a success.
gudnpqoy

gudnpqoy1#

您应该重新安装或更新gcc编译器

sudo apt-get install gcc
wwtsj6pe

wwtsj6pe2#

根据您的屏幕截图,这可能是因为一些问题,如C编译器的安装丢失或不正确。我的建议是检查C编译器的安装位置,并正确地安装所有依赖项。

sudo apt-get install gcc

检查config.log文件了解更多详细信息在这里你会得到详细信息,要么是C编译器的问题
通过运行以下命令检查C版本

gcc --version
ycggw6v2

ycggw6v23#

请使用以下命令更新您的ubuntu并安装最新的GCC版本:

sudo apt install build-essential

相关问题