2

I wrote a piece of software called "server" and I am trying to run it on a different linux box. The command I am typing is:

sudo ./server

I am in the directory with 'sever' in it, and it tells me that it cannot find the command. All the other questions I've seen similar to this state that sudo wasn't installed, but sudo is installed on this machine. If I try to run

./server

it says 'Permission denied' so it knows there is a file in this directory named 'server.'

I'm a windows guy normally, so if I'm missing something basic, don't laugh too hard. What am I missing?

2
  • What does file ./server and ldd ./server return? Dec 19, 2012 at 16:53
  • Ahh.... ldd ./server returned "you do not hvae read permission for './server'. I just did a 'sudo chmod 777 ./server' successfully. I run 'sudo ./server', and now I get 'FATAL: kernel too old' which is probably something in my code? I don't know, but I think my original issue is resolved, thanks!
    – Jeff
    Dec 19, 2012 at 17:00

1 Answer 1

4

You're being denied permission to execute your file. You can't execute a file without first making it executable.

ls -l server

Will show you the permissions of the file. You can set the execute bit with

chmod +x server

Your code can then be run as

./server

Your FATAL:kernel too old error arises because you compiled against a version of glibc which is much newer than the version of the kernel you are trying to run against. Either recompile with the glibc corresponding to the system where you intend to run the code, or run it on a different system, with the correct kernel.

By the way, 'server' is a pretty terrible name for an executable.

1
  • Yes, it is. It's a test for an application that has a server and client component. These are a few of my first coding projects with sockets, so 'server' will suffice.
    – Jeff
    Dec 19, 2012 at 19:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .