LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-26-2010, 12:10 PM   #1
wrathlonz
LQ Newbie
 
Registered: May 2010
Location: hills of central Massacusetts
Posts: 17

Rep: Reputation: 0
No such file or directory what am i missing here ?


Can't say how many times i have installed different distros only to eventually become frustrated and wipe it clean and install begrudgingly windows OS. But with that said my curiosity has me once again running linux.
I will hopefully stick it out this time or am determined to stick it out and learn the basics of Linux if it takes forever or not.

Current project is to install a linux based cod2 server on a home machine, which i have actually done before some years ago but can not get it working for the life of me again .

So i figure that if i take it one problem at a time I might actually learn the workings of the OS and figure it out with the help of experienced users here. I have tutorials on how to install the server , its just more of a problem of me not understanding the basics of Linux.

First Problem : I have installed the necessary files needed for the server in a directory"cod2" that i have created in my root/home directory .
OS is Ubuntu as i tried a few others and could not even get them installed so decided to start with a user friendly distro.
When i try to run the server i get an error that reports "no such file or directory" but if i bring up a dir.(type ls in console) list it clearly shows the file there. I am in that directory "cod2" as i navigate to it through the terminal with the cd command. I am logged in as root user as well . What am I missing here ? How can i receive this error when the file is clearly in the right directory .

thank you kindly for any help possible including links to where I might learn something basic that I am missing .

Wrath

ps I'm old yet determined and quite stubborn but very open minded and willing to learn .
 
Old 05-26-2010, 12:43 PM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
What is the complete path to the executable and what command are you running ?
 
Old 05-26-2010, 12:44 PM   #3
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
How are you trying to run the server? You need to be precise when asking for help. Post (copy and paste) the commands you run and all output you get.
 
Old 05-26-2010, 12:45 PM   #4
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Can you navigate to the directory and post the entire path (from the shell type pwd - which stands for Print Working Directory)?

Then from your tutorial, can you tell us what directory (the entire path) that it wants it installed in?
 
Old 05-26-2010, 02:38 PM   #5
wrathlonz
LQ Newbie
 
Registered: May 2010
Location: hills of central Massacusetts
Posts: 17

Original Poster
Rep: Reputation: 0
Awesome

Yes sorry , just got back in from working going to run some errands with the wife then Ill answer as best possible all of your responses . I am stunned and seriously enthused with the amazing response here , I surely have come to the right place .

Thanks you !

Wrath
 
Old 05-26-2010, 02:54 PM   #6
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
If you don't have permissions to a file, it will say it's not there.

$ ls -l /path/to/that/thing
You must comply with the permissions. drwxrwxrwx. read write execute. user(owner) / group / other / all?

Also bear in mind that services (daemons) run in their own space and don't have userspace environment variables. At least not set to the same settings. So you might have to use fully qualified paths on files and executables in whatever scripts or config files. Not always, but it's a good place to start.

And then there's selinux and access control lists to further complicate permissions. Things which might not have existed back when you last setup such a server. But they have been around for a while now, so it's mostly well documented. No ideal what a cod2 server is(yet), but hopefully this helps.
 
Old 05-26-2010, 02:56 PM   #7
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by Shadow_7 View Post
If you don't have permissions to a file, it will say it's not there.
If permissions are the problem, you'll get a "Permission denied" message, rather than a "No such file or directory".
 
Old 05-26-2010, 05:22 PM   #8
wrathlonz
LQ Newbie
 
Registered: May 2010
Location: hills of central Massacusetts
Posts: 17

Original Poster
Rep: Reputation: 0
smoker: complete path is only two directories root/cod2 the command is and I have used it before and worked and have a rented server with same is ./cod2_lnxded base command with all the server flags: ./cod2_lnxded +set dedicated 2 +set net_ip 0.0.0.0 +exec server.cfg +set sv_punkbuster 1 +map_rotate actually had it working one install ago except was receiving a library error which will be in my next post if i get this figured .

AlucardZero:
Bringing up the terminal and typing in the command listed above , hitting enter

root@gunz-desktop:~# cd
root@gunz-desktop:~# cd cod2
root@gunz-desktop:~/cod2# ./cod2_lnxded
bash: ./cod2_lnxded: No such file or directory
root@gunz-desktop:~/cod2# ./cod2_lnxded +set dedicated 2 +set net_ip 0.0.0.0 +exec server.cfg +set sv_punkbuster 1 +map_rotate
bash: ./cod2_lnxded: No such file or directory
root@gunz-desktop:~/cod2#

When i check the list
root@gunz-desktop:~/cod2# ls
cod2_lnxded cod.bmp gfx_d3d_x86_s.dll miles README.linux
CoD2MP_s.exe codlogo.bmp localization.txt mss32.dll
COD2SP_s.exe gfx_d3d_mp_x86_s.dll main pb
root@gunz-desktop:~/cod2#

pljvaldez:
root@gunz-desktop:~# cd cod2
root@gunz-desktop:~/cod2# pwd
/root/cod2
root@gunz-desktop:~/cod2#

Shadow_7:
Sorry my friend not really following you , certainty not because your explanation is not valid or sufficient, more so because of my lack of knowledge .

Previous Install (yes i have reinstalled the os a few times) I had it working as I had tried as a user (not root) then found out how to add root password to access root account , installed everything there and it actually worked well kinda i received the common error about libraries (./cod2_lnxded: error while loading shared libraries: libstdc++.so.5:cannot open shared object file: No such file or directory) tried to figure that out and hosed the OS . But thats the next step

Nylex:

Sounds like your correct but as mentioned I dont know much at all and thank you for your input.

thanks all for your input , do really appreciate it and once again excuse my ignorance if you will
thanks !
Wrath


Thanks everyone do appreciate it .
 
Old 05-26-2010, 05:45 PM   #9
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
What do the following return (when you're in ~/cod2)?:
Code:
ls -l cod2_lnxded
file cod2_lnxded
 
Old 05-26-2010, 06:32 PM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I'm curious about what's in README.linux as I see .exe and .dll files there. They only work on MS systems... should this be inside Wine?
 
Old 05-26-2010, 07:17 PM   #11
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
The problem is most likely that the file to run is in the current working directory. Unintuitively, the current working directory is NOT in the $PATH by default (but for good reason). The upshot of this is that you must type './theNameOfTheFile', specifying explicitly like this that the file is located in the current working directory. This is a common stumbling block for newbies.
--- rod.
 
Old 05-26-2010, 07:33 PM   #12
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Quote:
Originally Posted by theNbomr View Post
The upshot of this is that you must type './theNameOfTheFile', specifying explicitly like this that the file is located in the current working directory.
He did.
 
Old 05-26-2010, 07:45 PM   #13
wrathlonz
LQ Newbie
 
Registered: May 2010
Location: hills of central Massacusetts
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by AlucardZero View Post
What do the following return (when you're in ~/cod2)?:
Code:
ls -l cod2_lnxded
file cod2_lnxded
Code:
root@gunz-desktop:~# cd cod2
root@gunz-desktop:~/cod2# ls -l cod2_lnxded
-rwxr-xr-x 1 gunz gunz 1318204 2006-06-23 08:36 cod2_lnxded
root@gunz-desktop:~/cod2# file cod2_lnxded
cod2_lnxded: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.0, stripped
root@gunz-desktop:~/cod2#
 
Old 05-26-2010, 07:49 PM   #14
wrathlonz
LQ Newbie
 
Registered: May 2010
Location: hills of central Massacusetts
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chrism01 View Post
I'm curious about what's in README.linux as I see .exe and .dll files there. They only work on MS systems... should this be inside Wine?
Heres the read me and ill list it because it contains the error I was speaking of when i actually had it working concerning the libraries

Code:
Call Of Duty 2(tm)
Linux Multiplayer Server Code
Version 1.3
Readme
Last update: 2006-06-14
=============================

!! IMPORTANT !!
 Call of Duty 2(tm) Linux Server is NOT SUPPORTED by Activision(r) Customer
 Support. Please do not call with any questions related to this free beta
 product. There are other channels to aid you listed at the bottom of this
 document.


===============================================

TABLE OF CONTENTS

1. Introduction
2. Upgrading to 1.3.
3. Installation From Scratch
4. Support Channels
5. FreeBSD Note

===============================================


1. Introduction

 This document explains how to install the Call of Duty 2(tm) Linux server
 version 1.3. Installation from scratch and upgrading an existing installation
 are both covered.

 Usage is very similar to Call of Duty(tm) and United Offensive(tm)... many
 of the console commands, command lines, and cvars are identical, so if you
 are comfortable maintaining dedicated servers for those games, you will find
 this process familiar.

 MOD USERS: PLEASE READ...
  It is recommended that any user modifications that have been
  installed to the Call of Duty 2(tm) directory be removed before
  installing this package. These modifications are not supported
  by Activision(r) and may not be compatible with some of the new
  features that are included. When installing or upgrading a server,
  if problems or unexpected behavior arise, your first step in
  troubleshooting should be to do a clean install with the original
  data files.

 IF YOU HAVE A PROBLEM WITH "LIBSTDC++.SO.5" ...
  (This is a frequent-enough problem to merit discussion in the introduction.)

  If you are reading this, it's probably because you tried to start your Linux
   server and saw this message:

    ./cod2_lnxded: error while loading shared libraries: libstdc++.so.5:
     cannot open shared object file: No such file or directory

  COD2 is a C++ program built with gcc 3.3.4, which means it needs a
  system library specific to gcc 3.3. Older Linux systems won't have
  this installed, and we're starting to see newer Linux distributions that
  don't have this either, since they are supplying an incompatible
  gcc 3.4 version. The good news is that you can drop the needed library
  into your system without breaking anything else.

  Here is the library you need, if your Linux distribution doesn't supply it:
    http://icculus.org/updates/cod/gcc3-libs.tar.bz2

  You want to unpack that somewhere that the dynamic linker will see it
  (if you are sure it won't overwrite any files, you can even use /lib).

  The brave can put it in the same directory as the game and run the server
  like this:
     LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. ./cod2_lnxded

  Now the server will start.

2. Upgrading to 1.3

 Just stop the game server, replace cod2_lnxded, etc on your server with the
  files included in this package, and restart the game server.


3. Installation From Scratch

 - Get the retail Call of Duty 2(tm) disc(s) (there may be multiple discs
   depending on what edition of the game you have obtained, or perhaps a
   single DVD-ROM disc).
 - Copy the contents of disc ones "Setup/Data" directory to wherever you
   want to install the Call of Duty 2(tm) Linux server. There should be a
   "localization.txt" file in the root of this directory, and a "Main"
   Subdirectory.  Each additional disc should be opened and the contents of
   each "Data" folder should be copied over to the existing Main folder. When
   you have copied everything, the final installation size is around 3.5
   gigabytes.
 - Alternately, you may install on Windows(r) and copy the installed game to
   your Linux system, but many will opt to skip this step since the data
   files are uncompressed and easily accessible on the discs. Final
   installation size is around 3.5 gigabytes.
 - Unpack this archive in the root of the newly-copied tree, so
   "cod2_lnxded" is in the same directory as "localization.txt". Unlike the
   original Call of Duty(tm), there are not seperate .so files like
   "game.mp.i386.so", so don't be concerned when you don't see them.
 - Now, run the server:
     cd /where/i/copied/callofduty2
     ./cod2_lnxded

 - When you see "--- Common Initialization Complete ---", the game
   server has started, but you need to start a map before the server will
   accept connections. At this point, type:

     map mp_leningrad

   ("mp_leningrad" being a given map's name).

 - Now you should see your server in the in-game browser. You will now want to
   customize your server, but that is beyond the scope of this document.


4. Support Channels

 There are a LOT of knobs you can tweak to customize and automate your server,
 but it is beyond the scope of this documentation. Please refer to the
 admin manuals for any Quake 3(tm) based Multiplayer game (including Quake 3
 Arena(tm), Return to Castle Wolfenstein(tm), the original Call of Duty(tm)
 and United Offensive(tm), etc) for specifics.

 There is a mailing list for discussion and support of Linux servers for all
 of the Call of Duty(tm) games and expansion packs. Hundreds of experienced
 server admins and even some of the game's developers monitor this list, and
 are eager to help with politely asked questions. Send a blank email to
 cod-subscribe@icculus.org to get on the list, and list archives can be seen
 at:

   http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?38

 Bug reports should NOT be sent to the list. We have a web-based
 bugtracking system for this. If you don't report bugs there, we don't
 promise to even be aware of them, let alone fix them! You can find the bug
 tracker here:

   https://bugzilla.icculus.org/


 Also, http://callofduty.com/ and http://infinityward.com/ may direct you to
 important information, documentation and current news about Call of Duty(tm)
 titles.


5.  FreeBSD users

 This server is known to work on FreeBSD with the Linux binary compatibility
 layer. If it doesn't, we consider it a bug and appreciate the report since we
 won't necessarily be testing on FreeBSD ourselves. Please note that the
 game server requires that you use at least the linux_base-8 package for
 binary compatibility (it has a C++ runtime library we now need that previous
 linux_base packages don't supply...alternately, see notes about libstdc++ in
 this document's introduction if you can't or won't update linux_base).

// end of README.linux ...
They work perfectly with linux as long as you have the Binary cod2_lnxded , all the other files actually come from the windows version of the game .
 
Old 05-26-2010, 07:57 PM   #15
wrathlonz
LQ Newbie
 
Registered: May 2010
Location: hills of central Massacusetts
Posts: 17

Original Poster
Rep: Reputation: 0
hmm

Quote:
Originally Posted by theNbomr View Post
The problem is most likely that the file to run is in the current working directory. Unintuitively, the current working directory is NOT in the $PATH by default (but for good reason). The upshot of this is that you must type './theNameOfTheFile', specifying explicitly like this that the file is located in the current working directory. This is a common stumbling block for newbies.
--- rod.
I'm certainty a nuB when it comes to Linux and am trying to understand exactly what you are saying . "current working directory" meaning the directory that I have navigated to in the terminal ? I am sure that I am using the exact name of the file and exact command as you have listed above .
My gut feeling or instinct is telling me that its something simple that I am overlooking or missing . Anyways Ill read through the read me once again , make sure Im absolutely exact in my command , perhaps create another or use the other account instead of the root account .

Thanks Everyone !
Wrath
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing php extension directory: where is "./" directory? Kreshna Linux - Software 1 11-22-2009 03:31 AM
library missing:No such file or directory error(all files and paths are set properly venky.kv Linux - Newbie 3 03-09-2009 10:49 AM
How to protect a file/directory in your home login directory (RH Linux) jitsenho Linux - Security 9 07-03-2006 11:08 PM
SOURCE directory is missing m2azer Fedora 2 09-19-2004 12:26 AM
kde 3.1 compiling error, missing file or directory johnva Linux - Software 7 07-03-2003 04:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration