运维联盟俱乐部

 找回密码
 立即注册
查看: 2794|回复: 0

configure: error: no acceptable C compiler found in $PATH

[复制链接]
  • TA的每日心情
    开心
    2023-8-9 11:05
  • 发表于 2020-4-26 14:07:11 | 显示全部楼层 |阅读模式
    安装pg12, ./configure --prefix=/app/postgres/12时报错:
    1. checking build system type... x86_64-pc-linux-gnu
    2. checking host system type... x86_64-pc-linux-gnu
    3. checking which template to use... linux
    4. checking whether NLS is wanted... no
    5. checking for default port number... 5432
    6. checking for block size... 8kB
    7. checking for segment size... 1GB
    8. checking for WAL block size... 8kB
    9. checking for gcc... no
    10. checking for cc... no
    11. configure: error: in `/tmp/postgresql-12.2':
    12. configure: error: no acceptable C compiler found in $PATH
    13. See `config.log' for more details
    复制代码
    安装gcc
    1. [root@vm1 ~]# yum install gcc
    2. Loaded plugins: fastestmirror
    3. Repository base is listed more than once in the configuration
    4. Repository updates is listed more than once in the configuration
    5. Repository extras is listed more than once in the configuration
    6. Repository centosplus is listed more than once in the configuration
    7. Loading mirror speeds from cached hostfile
    8. * base: mirror.bit.edu.cn
    9. * extras: mirrors.aliyun.com
    10. * updates: mirror.bit.edu.cn
    11. base                                                                                                                                  | 3.6 kB  00:00:00     
    12. extras                                                                                                                                | 2.9 kB  00:00:00     
    13. updates                                                                                                                               | 2.9 kB  00:00:00     
    14. Resolving Dependencies
    15. --> Running transaction check
    16. ---> Package gcc.x86_64 0:4.8.5-39.el7 will be installed
    17. --> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-39.el7.x86_64
    18. --> Running transaction check
    19. ---> Package glibc-devel.x86_64 0:2.17-292.el7 will be installed
    20. --> Processing Dependency: glibc-headers = 2.17-292.el7 for package: glibc-devel-2.17-292.el7.x86_64
    21. --> Processing Dependency: glibc-headers for package: glibc-devel-2.17-292.el7.x86_64
    22. --> Running transaction check
    23. ---> Package glibc-headers.x86_64 0:2.17-292.el7 will be installed
    24. --> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-292.el7.x86_64
    25. --> Processing Dependency: kernel-headers for package: glibc-headers-2.17-292.el7.x86_64
    26. --> Running transaction check
    27. ---> Package kernel-headers.x86_64 0:3.10.0-1062.18.1.el7 will be installed
    28. --> Finished Dependency Resolution

    29. Dependencies Resolved

    30. =============================================================================================================================================================
    31. Package                                Arch                           Version                                         Repository                       Size
    32. =============================================================================================================================================================
    33. Installing:
    34. gcc                                    x86_64                         4.8.5-39.el7                                    base                             16 M
    35. Installing for dependencies:
    36. glibc-devel                            x86_64                         2.17-292.el7                                    base                            1.1 M
    37. glibc-headers                          x86_64                         2.17-292.el7                                    base                            687 k
    38. kernel-headers                         x86_64                         3.10.0-1062.18.1.el7                            updates                         8.8 M

    39. Transaction Summary
    40. =============================================================================================================================================================
    41. Install  1 Package (+3 Dependent packages)

    42. Total download size: 27 M
    43. Installed size: 44 M
    44. Is this ok [y/d/N]: y
    45. Downloading packages:
    46. (1/4): glibc-devel-2.17-292.el7.x86_64.rpm                                                                                            | 1.1 MB  00:00:00     
    47. (2/4): glibc-headers-2.17-292.el7.x86_64.rpm                                                                                          | 687 kB  00:00:00     
    48. (3/4): kernel-headers-3.10.0-1062.18.1.el7.x86_64.rpm                                                                                 | 8.8 MB  00:00:01     
    49. (4/4): gcc-4.8.5-39.el7.x86_64.rpm                                                                                                    |  16 MB  00:00:03     
    50. -------------------------------------------------------------------------------------------------------------------------------------------------------------
    51. Total                                                                                                                        7.6 MB/s |  27 MB  00:00:03     
    52. Running transaction check
    53. Running transaction test
    54. Transaction test succeeded
    55. Running transaction
    56.   Installing : kernel-headers-3.10.0-1062.18.1.el7.x86_64                                                                                                1/4
    57.   Installing : glibc-headers-2.17-292.el7.x86_64                                                                                                         2/4
    58.   Installing : glibc-devel-2.17-292.el7.x86_64                                                                                                           3/4
    59.   Installing : gcc-4.8.5-39.el7.x86_64                                                                                                                   4/4
    60.   Verifying  : glibc-devel-2.17-292.el7.x86_64                                                                                                           1/4
    61.   Verifying  : gcc-4.8.5-39.el7.x86_64                                                                                                                   2/4
    62.   Verifying  : glibc-headers-2.17-292.el7.x86_64                                                                                                         3/4
    63.   Verifying  : kernel-headers-3.10.0-1062.18.1.el7.x86_64                                                                                                4/4

    64. Installed:
    65.   gcc.x86_64 0:4.8.5-39.el7                                                                                                                                 

    66. Dependency Installed:
    67.   glibc-devel.x86_64 0:2.17-292.el7              glibc-headers.x86_64 0:2.17-292.el7              kernel-headers.x86_64 0:3.10.0-1062.18.1.el7  
    复制代码
    重新开始编译安装。



    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    运维联盟俱乐部 ( 冀ICP备19036648号 )

    GMT+8, 2024-5-3 08:06 , Processed in 0.046527 second(s), 21 queries , Gzip On.

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

    快速回复 返回顶部 返回列表