C++ 在centos上构建gcc?

C++ 在centos上构建gcc?,c++,c,linux,gcc,centos,C++,C,Linux,Gcc,Centos,我正在尝试在CentOS上构建gcc。我正努力做到这一页所写的: 在安装了python、bzr和其他一些软件包之后,我几乎做到了正确,但在这一步上:make-cgnu/hello 我发现这些错误: [root@localhost gsrc]# make -C gnu/hello make: Entering directory `/root/gsrc/gnu/hello' printf "[install-info] ==>Installing entries to the Info di

我正在尝试在CentOS上构建gcc。我正努力做到这一页所写的:

在安装了python、bzr和其他一些软件包之后,我几乎做到了正确,但在这一步上:
make-cgnu/hello

我发现这些错误:

[root@localhost gsrc]# make -C gnu/hello
make: Entering directory `/root/gsrc/gnu/hello'
printf "[install-info] ==>Installing entries to the Info directory\n"
[install-info] ==>Installing entries to the Info directory
if /bin/sh -c 'install-info --version' >/dev/null; then \
        for f in hello.info; do \
            install-info --dir-file="/root/gnu/share/info/dir" \
                "/root/gnu/share/info/$f"; \
        done; \
    else true; fi
/root/gnu/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)
make: *** [post-install] Error 1
make: Leaving directory `/root/gsrc/gnu/hello'

根据您提供的信息,我建议您只需手动创建缺少的目录:

mkdir -p /root/gnu/share/info/
然后重新运行make-C gnu/hello


此目录是信息管理器保存其信息文件的地方。但是,尽管安装信息程序在那里,但该目录丢失的事实表明您的安装出现了问题

好的,我这样做了,我得到了完全相同的错误,但不是
/root/gnu/share/info/dir:无法读取(没有这样的文件或目录),也无法创建(没有这样的文件或目录)
I get
install info:是/root/gnu/share/info/dir的目录
对不起,我弄错了:dir不是目录(!),它是文件。因此,删除目录(rmdir/root/gnu/share/info/dir)并在share(mkdir-p/root/gnu/share/info/)中创建目录信息。我想它会起作用的。如果是这样,我会相应地修改我的答案。而且我认为你不应该作为root操作。创建一个简单的用户,并仅在需要时使用root,因为这可能会导致意外和不受欢迎的行为。这并不能完全解决我试图做的事情,而是玩弄一个想法。有关如何编译开放源码项目的问题在这里不属于主题。为什么请问这个问题?我可以在哪里问这个问题?请参阅。您可能需要询问编写程序/脚本的人员。