Command not found cc, make error 127











up vote
0
down vote

favorite












I am trying to install shc on Ubuntu 18.04



wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.9b.tgz
tar xvfz shc-3.8.9.tgz
cd shc-3.8.9
make


But receive the following error:



cc -Wall  shc.c -o shc
make: cc: Command not found
makefile:31: recipe for target 'shc' failed
make: *** [shc] Error 127


The makefile:



# Makefile
#

INSTALL_PATH = /usr/local

# For SCO
CFLAGS = -b elf -O -D_SVID

# For IRIX
CFLAGS = -xansi -fullwarn -O3 -g0

# For Solaris
CFLAGS = -fast -xO4 -s -v -Xa

# For HPUX
CFLAGS = -Wall -O -Ae

# For OSF1
CFLAGS = -w -verbose -fast -std1 -g0

# For GNU C compiler
CFLAGS = -Wall # -O6 -pedantic

#SHELL = /bin/sh

SHCFLAGS = -v -T # Add -T option to allow binary to be traceable

all: shc ask_for_test

shc: shc.c
$(CC) $(CFLAGS) $@.c -o $@

ask_for_test:
@echo '*** �Do you want to probe shc with a test script?'
@echo '*** Please try... make test'

test: make_the_test ask_for_strings

make_the_test: match.x
@echo '*** Running a compiled test script!'
@echo '*** It must show files with substring "sh" in your PATH...'
./match.x sh

match.x: shc match
@echo '*** Compiling script "match"'
CFLAGS="$(CFLAGS)" ./shc $(SHCFLAGS) -f match

ask_for_strings:
@echo '*** �Do you want to see strings in the generated binary?'
@echo '*** Please try... make strings'

strings: make_the_strings ask_for_expiration

make_the_strings: match.x
@echo '*** Running: "strings -n 5 'match.x'"'
@echo '*** It must show no sensible information...'
strings -n 5 match.x

ask_for_expiration:
@echo '*** �Do you want to probe expiration date?'
@echo '*** Please try... make expiration'

expiration: til_yesterday ask_for_install

til_yesterday: shc match
@echo '*** Compiling "match" to expired date'
CFLAGS="$(CFLAGS)" ./shc $(SHCFLAGS) -vv -e `date "+%d/%m/%Y"` -f match
@echo '*** Running a compiled test script!'
@echo '*** It must fail showing "./match.x: has expired!"'
./match.x

ask_for_install:
@echo '*** �Do you want to install shc?'
@echo '*** Please try... make install'

install: shc
@echo '*** Installing shc and shc.1 on '$(INSTALL_PATH)
@echo -n '*** �Do you want to continue? '; read ANS; case "$$ANS" in y|Y|yes|Yes|YES) ;; *) exit 1;; esac;
install -c -s shc $(INSTALL_PATH)/bin/
install -c -m 644 shc.1 $(INSTALL_PATH)/man/man1/

clean:
rm -f *.o *~ *.x.c

cleanall: clean
rm -f shc *.x


I have no idea how to fix this error. Can anyone help?










share|improve this question




















  • 2




    Why are you even trying to build it from source? The shc package should be available from the universe repository: packages.ubuntu.com/bionic/shc. If you still believe you want to build it, then you should first install the build-essential tools package.
    – steeldriver
    Nov 22 at 17:30










  • Because the internet told me to. n0where.net/how-to-encrypt-bash-script I'll admit I never tried checking apt. Thanks for the help! It is now installed successfully.
    – tREEs
    Nov 22 at 17:37















up vote
0
down vote

favorite












I am trying to install shc on Ubuntu 18.04



wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.9b.tgz
tar xvfz shc-3.8.9.tgz
cd shc-3.8.9
make


But receive the following error:



cc -Wall  shc.c -o shc
make: cc: Command not found
makefile:31: recipe for target 'shc' failed
make: *** [shc] Error 127


The makefile:



# Makefile
#

INSTALL_PATH = /usr/local

# For SCO
CFLAGS = -b elf -O -D_SVID

# For IRIX
CFLAGS = -xansi -fullwarn -O3 -g0

# For Solaris
CFLAGS = -fast -xO4 -s -v -Xa

# For HPUX
CFLAGS = -Wall -O -Ae

# For OSF1
CFLAGS = -w -verbose -fast -std1 -g0

# For GNU C compiler
CFLAGS = -Wall # -O6 -pedantic

#SHELL = /bin/sh

SHCFLAGS = -v -T # Add -T option to allow binary to be traceable

all: shc ask_for_test

shc: shc.c
$(CC) $(CFLAGS) $@.c -o $@

ask_for_test:
@echo '*** �Do you want to probe shc with a test script?'
@echo '*** Please try... make test'

test: make_the_test ask_for_strings

make_the_test: match.x
@echo '*** Running a compiled test script!'
@echo '*** It must show files with substring "sh" in your PATH...'
./match.x sh

match.x: shc match
@echo '*** Compiling script "match"'
CFLAGS="$(CFLAGS)" ./shc $(SHCFLAGS) -f match

ask_for_strings:
@echo '*** �Do you want to see strings in the generated binary?'
@echo '*** Please try... make strings'

strings: make_the_strings ask_for_expiration

make_the_strings: match.x
@echo '*** Running: "strings -n 5 'match.x'"'
@echo '*** It must show no sensible information...'
strings -n 5 match.x

ask_for_expiration:
@echo '*** �Do you want to probe expiration date?'
@echo '*** Please try... make expiration'

expiration: til_yesterday ask_for_install

til_yesterday: shc match
@echo '*** Compiling "match" to expired date'
CFLAGS="$(CFLAGS)" ./shc $(SHCFLAGS) -vv -e `date "+%d/%m/%Y"` -f match
@echo '*** Running a compiled test script!'
@echo '*** It must fail showing "./match.x: has expired!"'
./match.x

ask_for_install:
@echo '*** �Do you want to install shc?'
@echo '*** Please try... make install'

install: shc
@echo '*** Installing shc and shc.1 on '$(INSTALL_PATH)
@echo -n '*** �Do you want to continue? '; read ANS; case "$$ANS" in y|Y|yes|Yes|YES) ;; *) exit 1;; esac;
install -c -s shc $(INSTALL_PATH)/bin/
install -c -m 644 shc.1 $(INSTALL_PATH)/man/man1/

clean:
rm -f *.o *~ *.x.c

cleanall: clean
rm -f shc *.x


I have no idea how to fix this error. Can anyone help?










share|improve this question




















  • 2




    Why are you even trying to build it from source? The shc package should be available from the universe repository: packages.ubuntu.com/bionic/shc. If you still believe you want to build it, then you should first install the build-essential tools package.
    – steeldriver
    Nov 22 at 17:30










  • Because the internet told me to. n0where.net/how-to-encrypt-bash-script I'll admit I never tried checking apt. Thanks for the help! It is now installed successfully.
    – tREEs
    Nov 22 at 17:37













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am trying to install shc on Ubuntu 18.04



wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.9b.tgz
tar xvfz shc-3.8.9.tgz
cd shc-3.8.9
make


But receive the following error:



cc -Wall  shc.c -o shc
make: cc: Command not found
makefile:31: recipe for target 'shc' failed
make: *** [shc] Error 127


The makefile:



# Makefile
#

INSTALL_PATH = /usr/local

# For SCO
CFLAGS = -b elf -O -D_SVID

# For IRIX
CFLAGS = -xansi -fullwarn -O3 -g0

# For Solaris
CFLAGS = -fast -xO4 -s -v -Xa

# For HPUX
CFLAGS = -Wall -O -Ae

# For OSF1
CFLAGS = -w -verbose -fast -std1 -g0

# For GNU C compiler
CFLAGS = -Wall # -O6 -pedantic

#SHELL = /bin/sh

SHCFLAGS = -v -T # Add -T option to allow binary to be traceable

all: shc ask_for_test

shc: shc.c
$(CC) $(CFLAGS) $@.c -o $@

ask_for_test:
@echo '*** �Do you want to probe shc with a test script?'
@echo '*** Please try... make test'

test: make_the_test ask_for_strings

make_the_test: match.x
@echo '*** Running a compiled test script!'
@echo '*** It must show files with substring "sh" in your PATH...'
./match.x sh

match.x: shc match
@echo '*** Compiling script "match"'
CFLAGS="$(CFLAGS)" ./shc $(SHCFLAGS) -f match

ask_for_strings:
@echo '*** �Do you want to see strings in the generated binary?'
@echo '*** Please try... make strings'

strings: make_the_strings ask_for_expiration

make_the_strings: match.x
@echo '*** Running: "strings -n 5 'match.x'"'
@echo '*** It must show no sensible information...'
strings -n 5 match.x

ask_for_expiration:
@echo '*** �Do you want to probe expiration date?'
@echo '*** Please try... make expiration'

expiration: til_yesterday ask_for_install

til_yesterday: shc match
@echo '*** Compiling "match" to expired date'
CFLAGS="$(CFLAGS)" ./shc $(SHCFLAGS) -vv -e `date "+%d/%m/%Y"` -f match
@echo '*** Running a compiled test script!'
@echo '*** It must fail showing "./match.x: has expired!"'
./match.x

ask_for_install:
@echo '*** �Do you want to install shc?'
@echo '*** Please try... make install'

install: shc
@echo '*** Installing shc and shc.1 on '$(INSTALL_PATH)
@echo -n '*** �Do you want to continue? '; read ANS; case "$$ANS" in y|Y|yes|Yes|YES) ;; *) exit 1;; esac;
install -c -s shc $(INSTALL_PATH)/bin/
install -c -m 644 shc.1 $(INSTALL_PATH)/man/man1/

clean:
rm -f *.o *~ *.x.c

cleanall: clean
rm -f shc *.x


I have no idea how to fix this error. Can anyone help?










share|improve this question















I am trying to install shc on Ubuntu 18.04



wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.9b.tgz
tar xvfz shc-3.8.9.tgz
cd shc-3.8.9
make


But receive the following error:



cc -Wall  shc.c -o shc
make: cc: Command not found
makefile:31: recipe for target 'shc' failed
make: *** [shc] Error 127


The makefile:



# Makefile
#

INSTALL_PATH = /usr/local

# For SCO
CFLAGS = -b elf -O -D_SVID

# For IRIX
CFLAGS = -xansi -fullwarn -O3 -g0

# For Solaris
CFLAGS = -fast -xO4 -s -v -Xa

# For HPUX
CFLAGS = -Wall -O -Ae

# For OSF1
CFLAGS = -w -verbose -fast -std1 -g0

# For GNU C compiler
CFLAGS = -Wall # -O6 -pedantic

#SHELL = /bin/sh

SHCFLAGS = -v -T # Add -T option to allow binary to be traceable

all: shc ask_for_test

shc: shc.c
$(CC) $(CFLAGS) $@.c -o $@

ask_for_test:
@echo '*** �Do you want to probe shc with a test script?'
@echo '*** Please try... make test'

test: make_the_test ask_for_strings

make_the_test: match.x
@echo '*** Running a compiled test script!'
@echo '*** It must show files with substring "sh" in your PATH...'
./match.x sh

match.x: shc match
@echo '*** Compiling script "match"'
CFLAGS="$(CFLAGS)" ./shc $(SHCFLAGS) -f match

ask_for_strings:
@echo '*** �Do you want to see strings in the generated binary?'
@echo '*** Please try... make strings'

strings: make_the_strings ask_for_expiration

make_the_strings: match.x
@echo '*** Running: "strings -n 5 'match.x'"'
@echo '*** It must show no sensible information...'
strings -n 5 match.x

ask_for_expiration:
@echo '*** �Do you want to probe expiration date?'
@echo '*** Please try... make expiration'

expiration: til_yesterday ask_for_install

til_yesterday: shc match
@echo '*** Compiling "match" to expired date'
CFLAGS="$(CFLAGS)" ./shc $(SHCFLAGS) -vv -e `date "+%d/%m/%Y"` -f match
@echo '*** Running a compiled test script!'
@echo '*** It must fail showing "./match.x: has expired!"'
./match.x

ask_for_install:
@echo '*** �Do you want to install shc?'
@echo '*** Please try... make install'

install: shc
@echo '*** Installing shc and shc.1 on '$(INSTALL_PATH)
@echo -n '*** �Do you want to continue? '; read ANS; case "$$ANS" in y|Y|yes|Yes|YES) ;; *) exit 1;; esac;
install -c -s shc $(INSTALL_PATH)/bin/
install -c -m 644 shc.1 $(INSTALL_PATH)/man/man1/

clean:
rm -f *.o *~ *.x.c

cleanall: clean
rm -f shc *.x


I have no idea how to fix this error. Can anyone help?







command-line compiling






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 at 17:36









S_Flash

1,061317




1,061317










asked Nov 22 at 17:24









tREEs

19514




19514








  • 2




    Why are you even trying to build it from source? The shc package should be available from the universe repository: packages.ubuntu.com/bionic/shc. If you still believe you want to build it, then you should first install the build-essential tools package.
    – steeldriver
    Nov 22 at 17:30










  • Because the internet told me to. n0where.net/how-to-encrypt-bash-script I'll admit I never tried checking apt. Thanks for the help! It is now installed successfully.
    – tREEs
    Nov 22 at 17:37














  • 2




    Why are you even trying to build it from source? The shc package should be available from the universe repository: packages.ubuntu.com/bionic/shc. If you still believe you want to build it, then you should first install the build-essential tools package.
    – steeldriver
    Nov 22 at 17:30










  • Because the internet told me to. n0where.net/how-to-encrypt-bash-script I'll admit I never tried checking apt. Thanks for the help! It is now installed successfully.
    – tREEs
    Nov 22 at 17:37








2




2




Why are you even trying to build it from source? The shc package should be available from the universe repository: packages.ubuntu.com/bionic/shc. If you still believe you want to build it, then you should first install the build-essential tools package.
– steeldriver
Nov 22 at 17:30




Why are you even trying to build it from source? The shc package should be available from the universe repository: packages.ubuntu.com/bionic/shc. If you still believe you want to build it, then you should first install the build-essential tools package.
– steeldriver
Nov 22 at 17:30












Because the internet told me to. n0where.net/how-to-encrypt-bash-script I'll admit I never tried checking apt. Thanks for the help! It is now installed successfully.
– tREEs
Nov 22 at 17:37




Because the internet told me to. n0where.net/how-to-encrypt-bash-script I'll admit I never tried checking apt. Thanks for the help! It is now installed successfully.
– tREEs
Nov 22 at 17:37










2 Answers
2






active

oldest

votes

















up vote
0
down vote













cc is an alias for the GNU C compiler (gcc). You can install it as follows:



 sudo apt install gcc


If, for some reason, the gcc compiler is already installed, but the symbolic link /usr/bin/cc is missing, you can also do:



 make CC=gcc





share|improve this answer




























    up vote
    0
    down vote













    sudo apt install build-essential



    This will install a C compiler (providing the cc command) as well as other tools that you may need for building software from source.






    share|improve this answer





















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














       

      draft saved


      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1095168%2fcommand-not-found-cc-make-error-127%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      0
      down vote













      cc is an alias for the GNU C compiler (gcc). You can install it as follows:



       sudo apt install gcc


      If, for some reason, the gcc compiler is already installed, but the symbolic link /usr/bin/cc is missing, you can also do:



       make CC=gcc





      share|improve this answer

























        up vote
        0
        down vote













        cc is an alias for the GNU C compiler (gcc). You can install it as follows:



         sudo apt install gcc


        If, for some reason, the gcc compiler is already installed, but the symbolic link /usr/bin/cc is missing, you can also do:



         make CC=gcc





        share|improve this answer























          up vote
          0
          down vote










          up vote
          0
          down vote









          cc is an alias for the GNU C compiler (gcc). You can install it as follows:



           sudo apt install gcc


          If, for some reason, the gcc compiler is already installed, but the symbolic link /usr/bin/cc is missing, you can also do:



           make CC=gcc





          share|improve this answer












          cc is an alias for the GNU C compiler (gcc). You can install it as follows:



           sudo apt install gcc


          If, for some reason, the gcc compiler is already installed, but the symbolic link /usr/bin/cc is missing, you can also do:



           make CC=gcc






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 22 at 18:07









          Peter Selinger

          262




          262
























              up vote
              0
              down vote













              sudo apt install build-essential



              This will install a C compiler (providing the cc command) as well as other tools that you may need for building software from source.






              share|improve this answer

























                up vote
                0
                down vote













                sudo apt install build-essential



                This will install a C compiler (providing the cc command) as well as other tools that you may need for building software from source.






                share|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  sudo apt install build-essential



                  This will install a C compiler (providing the cc command) as well as other tools that you may need for building software from source.






                  share|improve this answer












                  sudo apt install build-essential



                  This will install a C compiler (providing the cc command) as well as other tools that you may need for building software from source.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 22 at 19:39









                  Mark

                  313




                  313






























                       

                      draft saved


                      draft discarded



















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1095168%2fcommand-not-found-cc-make-error-127%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                      Mangá

                       ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕