Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-27-2014, 07:09 PM
|
#1
|
LQ Newbie
Registered: Feb 2014
Posts: 6
Rep: 
|
Trouble compiling a .tgz with GCC compiler
Hello, I've been following the instructions to install a program.
So far, I've did everything but i eventually get stuck on when i have to compile the program 'stress' with the GCC compiler. I also updated to the latest compiler. I'm logged in as root.
When I insert either of the 2 below into Debian GNU(debian-7.0-x86) - I get the following errors;
Code:
gcc: error: stress.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
The above 2 errors appear when i insert either one of the below;
Code:
gcc -Wall -c stress.c
gcc -pthread -o stress stress.o
If anyone can assist me with this problem further, contact me on skype via; @ eminem2ka9
Thank you =]
Last edited by Venet; 02-27-2014 at 07:11 PM.
|
|
|
02-27-2014, 09:52 PM
|
#2
|
Senior Member
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077
|
The error says there's no such file or directory. This leads me to believe that you may have attempted to run gcc against a file or directory that does not exist in your current location.
From what directory (provide full path please) are you attempting to execute the command?
And also, why are you using gcc directly? does `stress` not come with a Makefile or some kind of inbuilt build system?
|
|
1 members found this post helpful.
|
02-27-2014, 09:53 PM
|
#3
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
Furthermore, there is Debian package stress. Why are you trying to build it by hand?
|
|
|
02-27-2014, 09:55 PM
|
#4
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
show me the output of:
And I'll show you files not existing, or permission issues.
|
|
|
02-27-2014, 10:25 PM
|
#5
|
Senior Member
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683
|
Quote:
Originally Posted by Venet
Hello, I've been following the instructions to install a program.
|
Would be a good idea to provide a link to those instructions.
We will get a better picture of what it is you are trying to achieve.
|
|
|
02-28-2014, 12:34 PM
|
#6
|
LQ Newbie
Registered: Feb 2014
Posts: 6
Original Poster
Rep: 
|
Quote:
Originally Posted by szboardstretcher
show me the output of:
And I'll show you files not existing, or permission issues.
|
Output of 'ls'; http://prntscr.com/2wn5c0
Output of 'pwd'; root/sockstress (Though now I'm pretty sure I used 'make' which was built in, so no need for the compiler now?
Instructions are here; http://samsclass.info/123/proj10/sockstress.htm
OR; https://defuse.ca/sockstress.htm
I tried to insert a command, but; http://prntscr.com/2wn9ku
I used 'sudo' before the command, and the abort never appeared then, but still everything above it did.
Last edited by Venet; 02-28-2014 at 12:35 PM.
|
|
|
02-28-2014, 12:49 PM
|
#7
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
Look at your directory listing more closely, and youll see that there is no sockstress.c to compile. it looks like a binary called 'sockstress' already.
Ie: You cant use gcc to compile something that is already compiled.
Just run './sockstress'
|
|
|
02-28-2014, 12:58 PM
|
#8
|
LQ Newbie
Registered: Feb 2014
Posts: 6
Original Poster
Rep: 
|
Quote:
Originally Posted by szboardstretcher
Look at your directory listing more closely, and youll see that there is no sockstress.c to compile. it looks like a binary called 'sockstress' already.
Ie: You cant use gcc to compile something that is already compiled.
Just run './sockstress'
|
I've already tried to run ./sockstress = http://prntscr.com/2wnir3
|
|
|
03-01-2014, 01:02 AM
|
#9
|
Senior Member
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077
|
What Linux system are you using? I'm assuming you're ssh'd in to something.
Sockstress compiles and runs fine for me. What copy of the source code did you download? your source folder looks nothing like what I see. Go to the github link and download a copy of the latest version, then perform a `make` and then run it.
|
|
1 members found this post helpful.
|
03-01-2014, 11:09 AM
|
#10
|
LQ Newbie
Registered: Feb 2014
Posts: 6
Original Poster
Rep: 
|
Quote:
Originally Posted by notKlaatu
What Linux system are you using? I'm assuming you're ssh'd in to something.
Sockstress compiles and runs fine for me. What copy of the source code did you download? your source folder looks nothing like what I see. Go to the github link and download a copy of the latest version, then perform a `make` and then run it.
|
I've tried this on ubuntu, and debian. You have centos?
And yes, I'm using SSH connection(putty). I downloaded the source just now(github) - the same thing occurs.
1) I typed "wget https://github.com/defuse/sockstress/archive/master.zip"
2) Then i typed "cd sockstress"
3) Then i typed "make" - http://prntscr.com/2wx9e4
4) But If i typed "./sockstress", I'd only get an "buffer overflow detected - ./sockstress terminated" - http://prntscr.com/2wxamp
|
|
|
03-02-2014, 12:24 AM
|
#11
|
Senior Member
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077
|
Quote:
Originally Posted by Venet
1) I typed "wget https://github.com/defuse/sockstress/archive/master.zip"
2) Then i typed "cd sockstress"
3) Then i typed "make" - http://prntscr.com/2wx9e4
4) But If i typed "./sockstress", I'd only get an "buffer overflow detected - ./sockstress terminated" -
|
If that is literally what you did, you have done something wrong.
1. wget command looks ok
But you did not unzip the archive you downloaded, according to you. Here's what I would do :
mkdir ~/src
wget blahblah/master.zip
unzip *.zip -d ~/src (that unzips the master.zip file into the src directory)
cd ~/src
ls (just to make sure you see the files you need)
pwd (to make sure you're where you think you are)
make
./sockstress
|
|
1 members found this post helpful.
|
03-02-2014, 12:27 AM
|
#12
|
Senior Member
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077
|
I should also add, and I do not mean this in a pedantic way, that you ought to consider using Linux more often, as your primary OS. To get really good at the stuff you are doing in that course, knowing Linux would be invaluable and it would make all those commands and the logic of those commands make a lot more sense. I know using Linux is frustrating if you're really good on Windows, as you probably are, but after the initial learning curve, you have so much at your disposal. An t's free, after all, so the only real investment is the learning part. But it looks like you're ok with learning new stuff, since you're taking that course.
Just my thoughts. Again, not attempting to patronize you.
|
|
1 members found this post helpful.
|
03-02-2014, 12:15 PM
|
#13
|
LQ Newbie
Registered: Feb 2014
Posts: 6
Original Poster
Rep: 
|
Okay Everything looks grand! Thank you man =]
You're helpfulness is most appreciated by me.
I'm using this to test on my hosted website for vulnerabilities test purposes, so which command would be most effective?
Last edited by Venet; 03-02-2014 at 12:28 PM.
|
|
|
03-02-2014, 02:06 PM
|
#14
|
Senior Member
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077
|
I wasn't thinking of one command in particular; just saying that 1) if you know your way around a unix shell, then 2) testing for vulns is easier because you know your way around a unix shell, and 3) the way to learn your way around a shell is to use a shell, ergo 4) use unix often.
Anyway, glad it worked for you! If you go to the top of this thread > Thread Tools > Mark Thread as Solved, that'll close this thread. Also, if you found my advice helpful, mark 'yes' to "did you find this response helpful?"
Good luck, mate!
|
|
1 members found this post helpful.
|
03-02-2014, 03:47 PM
|
#15
|
LQ Newbie
Registered: Feb 2014
Posts: 6
Original Poster
Rep: 
|
Right, voted and 1 more thing;
Do you know how to add payload?
|
|
|
All times are GMT -5. The time now is 02:03 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|