Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8551825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:16:53+00:00 2026-06-11T14:16:53+00:00

Good day, i write script for building gcc on linux, my code is: #!/bin/bash

  • 0

Good day, i write script for building gcc on linux, my code is:

#!/bin/bash

export INSTALLATION_GCC=/opt

cd $INSTALLATION_GCC

tar xjvf gcc-4.7.0.tar.bz2

export srcdir="$INSTALLATION_GCC/gcc-4.7.0"

export objdir="$INSTALLATION_GCC/gcc-bin"

export insdir="$INSTALLATION_GCC/usr/local"

mkdir -p $srcdir

mkdir -p $objdir

mkdir -p $insdir

cd $objdir

$srcdir/configure --prefix=$insdir

make bootstrap

make install

but when i run this script i get errors:

No such file or directoryopt
tar (child): gcc-4.7.0.tar.bz2\r: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
/configure: No such file or directory
'.  Stop. No rule to make target `bootstrap
'.  Stop. No rule to make target `install

Why cd not work successful, if i execute my script (if i input this command in interactive mode all ok)?After building and installing gcc why my version of gcc not changing, how can i replace old version gcc properly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T14:16:54+00:00Added an answer on June 11, 2026 at 2:16 pm

    I think my comment about a backspace being part of the directory name is relevant:

    “There is something strange here, the error message No such file or directoryopt is missing a space and a /. It looks to me like your code did not generate this error message, are you sure that $INSTALLATION_GCC is /opt with the leading /? It almost appears that the first character of $INSTALLATION_GCC is a backspace.”

    I also spied gcc-4.7.0.tar.bz2\r in one of the error messages. A \r would give these effects. The most common unwanted source of \r (carriage-return) is Windows. Are you using something like Notepad on Windows to edit your scripts? If Windows is involved, convert your script using dos2unix.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good day! Now put this task: Need to write a script that will check
Good day, I typically write rather simple BASH scripts on a routine basis. I
Good day, I have been searching for a way to format output using writeline/write
Good day! i have a code below: def initial(*args): for arg in args: with
Good day, I've this code in view, it generates wrong number of arguments (3
Good day Im trying to implement a read/write privilege in a folder but no
Good day, In SQL Server 2005, when I write a new query, I like
Good day, I'm new to selenium and I'm trying to write a simple test.
Good day! I'm using ASP.NET MVC 2 and T4MVC and it seems some code
Good day. I need to teach Windows CryptoAPI to encrypt the message with private

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.