sudo: make: command not found

Discussion in 'Linux' started by tomrowley20287, Sep 25, 2008.

  1. tomrowley20287

    tomrowley20287

    Joined:
    Sep 5, 2008
    Messages:
    12
    Likes Received:
    0
    I'm trying to compile a tar.gz download and it goes as far as the make command and I just cant find anything on the forum search as to why the make command won't work.

    What am I doing wrong?
     
    tomrowley20287, Sep 25, 2008
    #1
  2. tomrowley20287

    Grim Squeaker

    Joined:
    Aug 19, 2008
    Messages:
    410
    Likes Received:
    0
    Make and gcc are not installed on the One by default. Use the package manager (pirut) to get the devolpment programs and libraries that you need.
     
    Grim Squeaker, Sep 25, 2008
    #2
  3. tomrowley20287

    tomrowley20287

    Joined:
    Sep 5, 2008
    Messages:
    12
    Likes Received:
    0
    My package manager states I already have Pirut installed and I installed GCC already.


    Do I need to get any other packages?

    If so which ones?
     
    tomrowley20287, Sep 25, 2008
    #3
  4. tomrowley20287

    IMSancho

    Joined:
    Aug 14, 2008
    Messages:
    95
    Likes Received:
    0
    Location:
    Australia
    did you install make as well?

    sudo yum install make
     
    IMSancho, Sep 25, 2008
    #4
  5. tomrowley20287

    tomrowley20287

    Joined:
    Sep 5, 2008
    Messages:
    12
    Likes Received:
    0
    Superb, thanks!
     
    tomrowley20287, Sep 26, 2008
    #5
  6. tomrowley20287

    Kitism

    Joined:
    Sep 27, 2008
    Messages:
    9
    Likes Received:
    0
    Sorry to kind of hijack this thread, but I've got the same problem.

    Problem is, though, that I've installed both GCC and Make, and it still tells me that there is no such command.

    I can't delete previously extracted archives; I don't have the permission to delete the files within them.
     
    Kitism, Sep 27, 2008
    #6
  7. tomrowley20287

    cpchan

    Joined:
    Sep 22, 2008
    Messages:
    201
    Likes Received:
    0
    What is the exact error outputted? What is the output of:

    Code:
    which make
    and

    Code:
    which gcc
    Also what language is the code written in?

    I don't understand what you are trying to say here. Why don't you have permission?
     
    cpchan, Sep 27, 2008
    #7
  8. tomrowley20287

    Kitism

    Joined:
    Sep 27, 2008
    Messages:
    9
    Likes Received:
    0
    Hey mate,

    Thanks for replying! :D

    Firstly, it gives me this:

    download/file.php?id=402

    I posted a screenshot of it earlier, don't know why that particular command doesn't work.

    Let me grab my AAO, I'll type the output:

    'which make' gives /usr/bin/make
    'which gcc' gives /usr/bin/gcc

    I don't know if that's what I'm supposed to get, but erm.

    Yeah, I was trying to install pyNeighborhood and it required me to extract and then compile it using the commands './configure', 'make' and 'make install'. I thought: "Gee, it must be a faulty install", and so I tried to delete the extracted files and start afresh. However, when I tried to re-extract it, it wouldn't let me overwrite the files. I tried to then delete them, however they fail to delete, as I have no 'permissions' over the files. I don't have any idea what's going on, really.

    I simply renamed them and re-extracted. Even after rebooting and shutting down, the 'make install' command will not work. I've tried to reinstall 'make', but when I go into 'Add/Remove Applications' and attempt to repair 'make', it fails because it doesn't have dependencies or something.

    Basically, I don't know whether I have to reinstall the 'make' command, because I've tried to reinstall it a few times and it says that it has nothing to update, the file is fine. I might go to /usr/bin/make and clear it out, then reinstall it again but I don't know what good that's gonna do.

    Thanks for listening,
    Chris

    EDIT: BREAKTHROUGH!

    I just noticed something; my directories don't match up.

    Linpus seems to think my 'make' files are in /usr/local/bin- and that's actually where it's looking for it. However, mine are in /usr/bin.

    This is a bit of a problem- I just spent about 10 minutes googling the solution.

    Basically- here's what I've done. I've typed this into terminal (keep in mind for some odd reason I have copied all the files relating to make from /usr/bin to /home/user/Videos):

    cp /home/user/Videos /usr/local/bin

    It kept on saying; 'omitted directory' and stuff like that, so I did a bit of googling and found out that you can't just write to /usr/, you need both root access and to use the -r command.

    ... and so I did, and got this:

    [blahblahblahblah]# cp -r /home/user/Videos /usr/local/bin
    [blahblahblahblah]# _

    ... where underscore is the flashing text cursor.

    It didn't end up copying, and now I'm stumped on how to copy files there. That seems to be the problem, and I think that if I can redirect make to look at /usr/bin instead of /usr/local/bin or instead copy the files to that directory, then I'll be all good :)

    Thanks again,
    Chris
     
    Kitism, Sep 27, 2008
    #8
  9. tomrowley20287

    kevin

    Joined:
    Sep 18, 2008
    Messages:
    274
    Likes Received:
    0
    With the greatest respect, `will not work' is not a sufficient problem description for solving problems to do with compiling code. Please post full error messages, etc.

    In addition, did `./configure' work? Did `make' work? If they worked fine (i.e., no error messages), then `make install' is _probably_ trying to write to system areas like /bin or /usr/bin, in which case you probably need do to `sudo make install'.

    But post the error messages -- it will help.
     
    kevin, Sep 27, 2008
    #9
  10. tomrowley20287

    cpchan

    Joined:
    Sep 22, 2008
    Messages:
    201
    Likes Received:
    0
    Install the package "coreutils" from Fedora.


    This is because some files are owned by root:

    Code:
    sudo rm -rf /home/usr/downloads//pyNeighborhood-0.4.1
    will delete it.

    You are misunderstanding things. It is telling you that the program you just compiled will go in to the /usr/local hierachy. This is where normal locally compiled programs go on a UNIX like system if you don't specify a prefix, eg:

    Code:
    ./configure --prefix=/usr 
    Just install "coreutils" and you will be set.
     
    cpchan, Sep 27, 2008
    #10
  11. tomrowley20287

    Kitism

    Joined:
    Sep 27, 2008
    Messages:
    9
    Likes Received:
    0
    With the greatest respect, `will not work' is not a sufficient problem description for solving problems to do with compiling code. Please post full error messages, etc.

    Sorry, should have probably noted that the error messages are within the screenshot, and I don't have the AA1 on me anymore.

    In addition, did `./configure' work? Did `make' work? If they worked fine (i.e., no error messages), then `make install' is _probably_ trying to write to system areas like /bin or /usr/bin, in which case you probably need do to `sudo make install'.

    That's what I'm thinking, and I'll try appending sudo to the front of the command now. Yes, both commands except for 'make install' worked fine. Sorry, I was just a bit confused- I'd actually posted about this in the other thread, must've gotten confused about it.

    Would you like me to copy and paste it? If you take a look at the screenshot, the error message is there- error 127.

    EDIT: Thanks for that, cpchan. This is my first time fiddling around with Linux, so I guess I was taking potshots. I tried to install a bunch of coreutils but it had some error to do with the dependencies so it didn't work entirely.

    Do I just install coreutils like I have before with yum? sudo yum install coreutils?

    Well, I'll see what happens if I type that anyway. I was thinking of using the -rf command, but I'm afraid of stuffing things up even more! :D

    Thanks so much for the help again, I'm a bit lost in Linux :)

    Thanks for your help,
    Chris

    EDIT2: Used sudo make install and updated my coreutils and it worked!

    Thanks a lot cpchan, you're very knowledgeable and helpful around here. :D

    Anyway, I'll go delete that folder now; sorry for being a bit prudish in my replies, got a bit panicky and arrogant about my ability to fix computers myself!

    :D

    Anyway, yeah- I might collaborate with one of the other guys on here who was writing a blog about it and add this conversation to the mix!

    Night, and thanks again :)
     
    Kitism, Sep 27, 2008
    #11
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.