每个命令都会产生分段错误

时间:2014-10-24 20:09:40

标签: linux terminal

所以我试图安装Linuxbrew,并没有太多的运气,所以我使用github网站的故障排除部分来安装它。它似乎一切正常,但一旦命令完成运行的东西是错误的。我输入的每个命令都会出现分段错误。如果它使用bash或像bash --version这样简单的东西运行shell脚本无关紧要。来自Homebrew / Linuxbrew的代码块在下面搞砸了我。

prefix=~/.linuxbrew
PATH="$prefix/bin:$prefix/sbin:$PATH"
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/linuxbrew/go/install)"
ln -s $(which gcc) $prefix/bin/gcc-$(gcc -dumpversion |cut -d. -f1,2)
ln -s $(which g++) $prefix/bin/g++-$(g++ -dumpversion |cut -d. -f1,2)
ln -s $(which gfortran) $prefix/bin/gfortran-$(gfortran -dumpversion |cut -d. -f1,2)
brew install hello && brew test -v hello; brew remove hello
sudo yum install gcc44 gcc44-c++
ln -s /usr/bin/gcc44 $prefix/bin/gcc-4.4
ln -s /usr/bin/g++44 $prefix/bin/g++-4.4
ln -s /usr/bin/gfortran44 $prefix/bin/gfortran-4.4
export HOMEBREW_CC=gcc-4.4
brew install hello && brew test -v hello; brew remove hello
brew install glibc
brew remove binutils
brew unlink glibc
brew test glibc
brew install hello && brew test -v hello; brew remove hello
ln -s lib $prefix/lib64
brew install https://raw.githubusercontent.com/Homebrew/homebrew-dupes/master/zlib.rb
brew install binutils
brew install hello && brew test -v hello; brew remove hello
brew link glibc
ln -s /usr/lib64/libstdc++.so.6 /lib64/libgcc_s.so.1 $prefix/lib/
brew install gcc --with-glibc -v
rm -f $prefix/lib/{libstdc++.so.6,libgcc_s.so.1}
brew link gcc
export HOMEBREW_CC=gcc-4.9
brew install hello && brew test -v hello; brew remove hello
brew install curl expat git
brew tap homebrew/dupes
brew install bzip2 coreutils findutils gawk gnu-sed gnu-which grep libpng libxml2 libxslt make ncurses readline ruby
PATH=$prefix/bin:$prefix/sbin
brew install hello && brew test -v hello; brew remove hello
ln -s ncursesw/curses.h $prefix/include 

任何想法如何回到终端实际上​​允许我这样做的地步,好吧,什么?我在Linux RedHat上

1 个答案:

答案 0 :(得分:0)

为了解决上述脚本引起的问题,我们从头开始重建了.bashrc文件。