Я пытался установить rvm с помощью \curl -L https://get.rvm.io | bash -s stable --ruby --autolibs=enable --auto-dotfiles. Он работал нормально, пока не получил ошибку конфигурации:
Error running './configure --prefix=/home/nishant/.rvm/rubies/ruby-2.0.0-p247 --disable-install-doc --enable-shared',
please read /home/nishant/.rvm/log/1379591052_ruby-2.0.0-p247/configure.log
There has been an error while running configure. Halting the installation.
Ниже приведено содержимое указанного файла журнала:
[2013-09-19 17:15:58] ./configure
current path: /home/nishant/.rvm/src/ruby-2.0.0-p247
command(4): ./configure --prefix=/home/nishant/.rvm/rubies/ruby-2.0.0-p247 --disable-install-doc --enable-shared
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/nishant/.rvm/src/ruby-2.0.0-p247':
configure: error: C compiler cannot create executables
See `config.log' for more details
Затем я попробовал программу «hello world» C и получил следующую ошибку при компиляции:
nishant@nishant-Inspiron-1545:~$ gcc -g -o hello hello.c
/usr/local/bin/ld: this linker was not configured to use sysroots
collect2: error: ld returned 1 exit status
Я не уверен, почему эта ошибка возникает. Я не мог найти удовлетворительного ответа на этом форуме. Может кто-то помочь. Спасибо
Вопреки сложным причинам, приведенным выше, в моем случае это был просто случай отсутствия g++. Как ни странно, сообщение об ошибке было таким же, как описано в OP i.e
configure: error: C compiler cannot create executables
В любом случае, я решил это, установив g ++:
sudo apt-get install g++
Попробуйте обновить систему, переустановите пакеты, обеспечивающие ld и компилятор (gcc). Запустите prelink -au && depmod -a. Затем перезагрузитесь.
Возможно, вам придется отключить или перенастроить prelink в /etc/systemctl или везде, где установлены ваши дистрибутивы.