Find the answer to your Linux question:
Results 1 to 8 of 8
I'm trying to install GCC. I've made the make files. Code: ed@Awesome:~/Desktop/gcc-4.2.1$ sudo make install Password: make[1]: Entering directory `/home/ed/Desktop/gcc-4.2.1' /bin/sh ./mkinstalldirs /usr/local /usr/local cd: 5: can't cd to host-i686-pc-linux-gnu/fixincludes ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2007
    Location
    USA
    Posts
    61

    Install Error


    I'm trying to install GCC. I've made the make files.
    Code:
    ed@Awesome:~/Desktop/gcc-4.2.1$ sudo make install
    Password:
    make[1]: Entering directory `/home/ed/Desktop/gcc-4.2.1'
    /bin/sh ./mkinstalldirs /usr/local /usr/local
    cd: 5: can't cd to host-i686-pc-linux-gnu/fixincludes
    make[1]: *** [install-fixincludes] Error 2
    make[1]: Leaving directory `/home/ed/Desktop/gcc-4.2.1'
    make: *** [install] Error 2
    I know very little about program installation.

  2. #2
    Just Joined!
    Join Date
    Jan 2007
    Location
    Germany
    Posts
    73
    Did You have any errors/warnings on previous stages (./configure & make) ???

  3. #3
    Linux Newbie Tutku's Avatar
    Join Date
    Jul 2007
    Location
    Izmir / Turkey
    Posts
    167
    under ubuntu, you need build-essential package for compiling and installing programs. please make sure that you have installed it.

    on the other hand why don't you use APT or synaptic?

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jul 2007
    Location
    USA
    Posts
    61
    Quote Originally Posted by Tutku View Post
    under ubuntu, you need build-essential package for compiling and installing programs. please make sure that you have installed it.

    on the other hand why don't you use APT or synaptic?
    I tried APT just now, and it says I have the latest version. I guess the warning was nothing to worry about for now. How do I use G++?

  6. #5
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Write c++ code in any text editor like vi, nano or gedit. Let say, filename is test.cpp
    Execute this
    Code:
    g++ test.cpp
    ./a.out
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  7. #6
    Just Joined!
    Join Date
    Jul 2007
    Location
    USA
    Posts
    61
    That's what I thought. It was the .cpp extension that was the problem. Anjuta was saving C++ files as .cc ...? (these are the files I was using to test) Once I change it to .cpp it was fine. Thank you.
    Edit: How do I specify the name of the compiled executable?

  8. #7
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Use -o option
    Code:
    g++ test.cpp -o test
    ./test
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  9. #8
    Just Joined!
    Join Date
    Jul 2007
    Location
    USA
    Posts
    61
    Thanks a lot! I can finally start programming in Linux!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •