No such file or directory what am i missing here ?
Linux - NewbieThis 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
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.
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.
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 .
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 .
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.
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
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.
The upshot of this is that you must type './theNameOfTheFile', specifying explicitly like this that the file is located in the current working directory.
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 .
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 .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.