LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GCC problems..HELP (https://www.linuxquestions.org/questions/linux-newbie-8/gcc-problems-help-441415/)

nectron101 05-03-2006 08:56 PM

GCC problems..HELP
 
I've just installed GCC 3.3.5 on a suse 9.1 Personal system..

Now when I try to compile, I get this:

linux:/home/Nectron/Desktop # gcc code.c
/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../../i586-suse-linux/bin/ld: unrecognized option '--as-needed'
/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../../i586-suse-linux/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
-----------------

I really need gcc to work so I can install packages..

Your help is much appreciated!

AwesomeMachine 05-03-2006 09:23 PM

In Yast, or control center > Yast Modules

Go to change installation source.

Add an ftp installation source:

mirrors.kernel.org
/suse/i386/9.1

no user or password.

Make that the first source, and the only one that is active. Just read the screen and you'll do fine.

Finish

Go to install software. Search for "gcc". Install the correct gcc for your distro, which will be the one shown. Agree with SuSE's recommendations for dependencies.

Now you will have the right gcc for your version of ld. You don't need to reboot. Everything should work now.

Don't install any of the development tools in SuSE except with Yast.

nectron101 05-03-2006 09:53 PM

nothing starts when I click the 'change source of installation'..

I really fed up with gcc..

AwesomeMachine 05-03-2006 10:47 PM

OK, Do this:

Get a root shell and type:

init 3

Log in as root

type:

yast2

goto software > and do everything from there.

Narev 05-04-2006 02:22 AM

I tried this too...
 
Went into Yast, went to set up a new source like you said, hit ftp. In the site box I entered mirrors(dot)kernel(dot)org and the directory I put in /suse/i386/10.0/ I just got a box saying:
________________________________________________________
| Unable to create installation source
| from URL 'ftp://mirrors(dot)kernel(dot)org/suse/i386/10.0/'.
| Details:
| ERROR(InstSrc:E_no_instsrc_on_media)
| Try again?
|
| | Yes | | No |
|
|________________________________________________________

Trying again results in the same message. What's up?

-Narev

(I cannot post URLs yet, hence (dot) and (slash))

AwesomeMachine 05-04-2006 11:18 PM

Don't use /suse/i386/10.0. If it did let you use 10.0 it would wreck your whole system. If you want to upgrade you can do that, but putting version 10's repository for an installation source is not going to do an upgrade for you. Use /suse/i386/9.1. SuSE messed with their mirrors. Version 10 isn't the same kind of tree as 9.x. You can upgrade to 9.3 by downloading ftp/mirrors.kernel.org/suse/i386/9.3/boot/boot.iso
Burn it to a CD, and do a network install. You boot with that CD, and when the boot menu comes up, hit the down arrow to stop the counter. One of the F keys listed at the bottom of the screen will allow you to set ftp as installation. You can use the same mirror I already gave you, but instead of 9.1 put 9.3. Then, when the screen comes up select that you want to do an upgrade. Unless your /home directory is in a separate partition, because you don't have to format it then.

Otherwise, just put the 9.1 mirror in installation sources and reinstall gcc.


All times are GMT -5. The time now is 04:06 AM.