Archlinux将gcc从5.2降级到4.8

时间:2015-12-26 21:07:31

标签: gcc archlinux

我想在当前的ArchLinux上降级我的gcc。

    Makefile:545: recipe for target 'libstdc++.la' failed
    make[6]: *** [libstdc++.la] Error 139
    make[6]: Leaving directory '/tmp/yaourt-tmp-jester/aur-gcc48/src/gcc-        build/x86_64-unknown-linux-gnu/libstdc++-v3/src'
    Makefile:575: recipe for target 'all-recursive' failed
    make[5]: *** [all-recursive] Error 1
    make[5]: Leaving directory '/tmp/yaourt-tmp-jester/aur-gcc48/src/gcc-        build/x86_64-unknown-linux-gnu/libstdc++-v3/src'
    Makefile:480: recipe for target 'all-recursive' failed
    make[4]: *** [all-recursive] Error 1
    make[4]: Leaving directory '/tmp/yaourt-tmp-jester/aur-gcc48/src/gcc-        build/x86_64-unknown-linux-gnu/libstdc++-v3'
    Makefile:386: recipe for target 'all' failed
    make[3]: *** [all] Error 2
    make[3]: Leaving directory '/tmp/yaourt-tmp-jester/aur-gcc48/src/gcc-        build/x86_64-unknown-linux-gnu/libstdc++-v3'
    Makefile:12181: recipe for target 'all-stage1-target-libstdc++-v3' failed
    make[2]: *** [all-stage1-target-libstdc++-v3] Error 2
    make[2]: Leaving directory '/tmp/yaourt-tmp-jester/aur-gcc48/src/gcc-build'
    Makefile:19114: recipe for target 'stage1-bubble' failed
    make[1]: *** [stage1-bubble] Error 2
    make[1]: Leaving directory '/tmp/yaourt-tmp-jester/aur-gcc48/src/gcc-build'
    Makefile:885: recipe for target 'all' failed
    make: *** [all] Error 2
    ==> ERROR: A failure occurred in build().
        Aborting...
    ==> ERROR: Makepkg was unable to build gcc48.
    ==> Restart building gcc48 ? [y/N]
    ==> ------------------------------
    ==> 

当我尝试通过gcc安装时         yaourt --noconfirm - 需要gcc48

有人知道它为什么不起作用。这些错误无论如何都无济于事......

3 个答案:

答案 0 :(得分:3)

在arch linux上可以使用shell命令:

  

降级gcc

答案 1 :(得分:2)

cd /var/cache/pacman/pkg/
pacman -U <file_name_of_the_package>

当然,你必须拥有你想要的版本。

-> alexmina
"downgrade gcc"

你确定你使用的是Archlinux吗?

答案 2 :(得分:1)

您应指定gccgcc-libs。例如,如果您要将7.1.1降级为6.3.1

方法1)

pacman -U /var/cache/pacman/pkg/gcc-6.3.1-2-x86_64.pkg.tar.xz /var/cache/pacman/pkg/gcc-libs-6.3.1-2-x86_64.pkg.tar.xz  

方法2)

downgrade gcc gcc-libs

选择想要的版本。