Hi,

I got a problem when I tried installing Ruby in Linux(Ubuntu)

When I execute the command I got the following err.
sudo apt-get -f install ruby irb rdoc libruby1.8 ruby1.8-dev

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
build-essential: Depends: libc6-dev but it is not going to be installed or
libc-dev
Depends: g++ (>= 4:4.0) but it is not going to be installed
Depends: dpkg-dev (>= 1.13.5) but it is not going to be installed
g++-2.95: Depends: gcc-2.95 (>= 1:2.95.4) but it is not going to be installed
Depends: gcc-2.95 (< 1:2.95.5) but it is not going to be installed
Depends: libstdc++2.10-dev (>= 1:2.95.4) but it is not going to be installed
gcc: Depends: gcc-4.0 (>= 4.0.3) but it is not going to be installed
irb: Depends: irb1.8 but it is not going to be installed
rdoc: Depends: rdoc1.8 but it is not going to be installed
ruby: Depends: ruby1.8 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Then I followed a different approach given in this PDF

When i try to execute ./configure I got the following err.

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... no
checking for cc... no
checking for cl.exe... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

I googled to solve the problem and in the ubuntu forum they suggested to install g++ package. So i downloaded g++ package and when I install g++ it prompted me to install gcc. When i try to install it throws some other err. Check out the below logs for more details.

naveen$ sudo dpkg -i gcc_4.0.3-1_i386.deb
dpkg - warning: downgrading gcc from 4.1.1-6ubuntu3 to 4.0.3-1.
(Reading database ... 98327 files and directories currently installed.)
Preparing to replace gcc 4: 4.1.1-6ubuntu3 (using gcc_4.0.3-1_i386.deb) ...
Removing old gcc doc directory.
Unpacking replacement gcc ...
dpkg: dependency problems prevent configuration of gcc:
gcc depends on gcc-4.0 (>= 4.0.3); however:
Package gcc-4.0 is not installed.
dpkg: error processing gcc (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
gcc


naveen$ sudo dpkg -i g++- 2.95_2.95.4-24_i386.deb
(Reading database ... 98327 files and directories currently installed.)
Preparing to replace g++-2.95 1:2.95.4-24 (using g++-2.95_2.95.4-24_i386.deb) ...
Unpacking replacement g++-2.95 ...
dpkg: dependency problems prevent configuration of g++-2.95:
g++-2.95 depends on gcc-2.95 (>= 1:2.95.4); however:
Package gcc-2.95 is not installed.
g++-2.95 depends on gcc-2.95 (<< 1:2.95.5); however:
Package gcc-2.95 is not installed.
g++-2.95 depends on libstdc++2.10-dev (>= 1:2.95.4); however:
Package libstdc++2.10-dev is not installed.
dpkg: error processing g++-2.95 (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
g++-2.95

Can anyone help me to solve this problem. Any pointers would be much appreciated.

Cheers,
Naveen