C compiler cannot create executables
Try to install Ruby on Linux. However, when i try to run following, it gives me erro
laptop:
Password:
checking build system type... i686-pc-
checking host system type... i686-pc-
checking target system type... i686-pc-
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
Anybody has idea about that, thanks
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu firefox Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
You need to install some development tools that are not installed by default. This should help:
sudo apt-get install build-essential
Revision history for this message
|
#2 |
Thank you for your help. But when i try to continute to install. the message is like following, it seem like 'mkdir' permission denied
mkdir -p -m 755 /usr/local/
/home/jihengb/
from /home/jihengb/
from /home/jihengb/
from /home/jihengb/
from /home/jihengb/
from /home/jihengb/
from ./instruby.rb:81:in `makedirs'
from ./instruby.rb:109
make: *** [do-install-local] Error 1
Revision history for this message
|
#3 |
Are you using sudo before ./configure && make && make install?
From the above message, it seems that your make was successful, but make install failed, because you don't have write permissions for /usr/local/
By the way, if you are using Feisty, and want to install ruby 1.8.5 through apt-get, do sudo apt-get ruby1.8
Doing sudo apt-get ruby will install ruby 1.8.2-1, and doing sudo apt-get ruby1.9 will install ruby 1.9
Revision history for this message
|
#4 |
Yes. I use command like following:
sudo ./configure && make && make install.
Still give me the wrong message. i am installing ruby 1.8.4. do you mean try sudo apt-get install ruby1.8. it is not working. How do i solve the write permissions for /us/local/ ??? it is still same erro after running?.
Thanks a lot!!!
Revision history for this message
|
#5 |
Hello,
If you want to install ruby on ubuntu, the easiest method is to use a precompiled package, try:
sudo apt-get install ruby
If you really want to compile ruby from source, then the correct command is:
./configure && make && sudo make install
Revision history for this message
|
#6 |
sudo apt-get install ruby works fine !!! Thanks a lot !!! One question,
when I type ruby -v, it shows: ruby 1.8.4 (2005-12-24) [i486-linux]
I guess that's mean ruby already install ??
Revision history for this message
|
#7 |
Yup, you have ruby installed now :-)
Revision history for this message
|
#8 |
Thank You!!!!!
What commands for install : RubyGems and Rail ??? Please help. i need to get this done
In fact, this is my first time using Linux. I just follow the book to install. But Can not be sucessful until you guys direct me.
Revision history for this message
|
#9 |
For installing Ruby on Rails and RubyGems, use this:
sudo apt-get install rails rubygems
Here are the package details:
http://
http://
Revision history for this message
|
#10 |
Sorry, it still shows some mistakes
:~/Desktop$ sudo apt-get install rails rubygems
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package rails
Also, for some reason, even though i have ruby install, why i can not find any directory and file for ruby 1.8.4
Thanks a lot!!
Revision history for this message
|
#11 |
Hello,
to install rails, you have to add the universe repository,
howto here: https:/
Revision history for this message
|
#12 |
hmm in fact this howto is not really up-to-date,
you can add the universe repository with:
System-
Revision history for this message
|
#13 |
And if you want to know which files are installed for the ruby package,
go to synaptic: System-
Search for ruby
right-click on ruby -> Properties
Go to 'installed Files' tab
Revision history for this message
|
#14 |
I try to use following link to install rubygems:
http://
it gave me message "Error:Dependency is not satisfiable : libgems-ruby1.8
Also, when itry to command:sudo apt-get install rails rubygems
E: Couldn't find package rubygems
FYI:I already add universe repository
Thank for your help !!!
Revision history for this message
|
#15 |
Hello,
What is the result of this command ? :
sudo apt-cache madison libgems-ruby1.8 rubygems
Does running "sudo apt-get update" solve this ?
What is the content of /etc/apt/
cat /etc/apt/
Revision history for this message
|
#16 |
after run : sudo apt-cache madison libgems-ruby1.8 rubygems .
I still have the same problem: E: Couldn't find package rubygems
After run "sudo apt-get update" , The erro message is below:
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
i tired to cat sources.lst. no such directory. I used synaptic package manage found there is no cotents in source.lst but in source:
Revision history for this message
|
#17 |
You made a typo, it is "cat /etc/apt.
about the error with sudo apt-get update, it means that a update program is open and is blocking access to other update programs, closing the update program or rebooting the computer should fix this problem.
Revision history for this message
|
#18 |
Ok. I will try that soon and will let you know about it.
By the way, what is command for install MYsql database.
could you give me the steps for downlaon ruby,rails, rubygems and mySQl. I saw some sites have by click one to download for whole package. I don't know know if there is one click to donwload everything for Linux. Please give me the steps.
Revision history for this message
|
#19 |
still not work. Can somebody help to install that thing !!! i was so painful.
Right now . I ma try to install ubygems. after i run ruby setup.rb
give me the erro:
/usr/local/
from /usr/local/
from /usr/local/
from /usr/local/
from /home/jiheng/
from /home/jiheng/
from setup.rb:1526:in `exec_task_
from setup.rb:1342:in `exec_install'
from setup.rb:1000:in `exec_install'
from setup.rb:814:in `invoke'
from setup.rb:773:in `invoke'
from setup.rb:1578
Please help. I don't understand why just install this to Linux are so difficult???
Revision history for this message
|
#20 |
Hello again,
You still didn't answer my question, what is the content of the /etc/apt/
please type the following in a terminal (without errors) and report the output here:
cat /etc/apt/
Revision history for this message
|
#21 |
PLEASE SEE BELOW REPORT:
:~/rubygems-0.9.0$ cat /etc/apt/
deb cdrom:[Ubuntu 6.10 _Edgy Eft_ - Release i386 (20061025)]/ edgy main restricted
deb http://
deb-src http://
## Major bug fix updates produced after the final release of the
## distribution.
deb http://
deb-src http://
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb http://
# deb-src http://
## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://
# deb-src http://
deb http://
deb-src http://
# deb http://
deb http://
deb-src http://
deb http://
deb-src http://
# deb-src http://
Revision history for this message
|
#22 |
ahhhhhhh
You should have told us you are still using ubuntu edgy.
Please upgrade to feisty.
more information here:
http://
Revision history for this message
|
#23 |
Taje so long to upgrade. what's wrong with this software. i almost given up. Would you just tell how to uninstalll the linx. I don't want to install anymore. I feel really sad. so many mistakes. i could not figure out. I know i am using the old version. however, why it is so many problems.....I could not understand !!! i also try to donwload 7.04 v to my live cd. It takes so long to download (15% only but already 4 hours)
But thank you for your help !!!
Revision history for this message
|
#24 |
one question:
do i have to download 7.04 desktop eidition or server edition ? i need to post my site in public
Thanks
Revision history for this message
|
#25 |
The desktop edition automatically installs a graphical desktop (gnome for ubuntu, kde for kubuntu, xfce for xubuntu). The server edition does not, but instead installs automatically some server software (i.e. webserver, database etc.)
In general you can start with either edition since you can always install all software later. However, it makes sense to use the one that is from the beginning closer to what you want to do.
Revision history for this message
|
#26 |
if i want to install ruby on rails. so i need to install server edidtion or desktop edition. Please advise
thanks
Revision history for this message
|
#27 |
when i trird to run :sudo apt-get install ruby ri rdoc libmysql-ruby
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
Revision history for this message
|
#28 |
Thanks for your question.
Please close Synaptic Package Manager before calling that command.
Revision history for this message
|
#29 |
You can install ruby on rails on the server edition as well as the desktop edition. Since, the desktop edition automatically installs a graphical desktop, I'd recommend desktop edition for you. (though you can also install a graphical desktop on server edition as well).
Can you help with this problem?
Provide an answer of your own, or ask hero1971 for more information if necessary.