Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Shell is not executable
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
snorkel
Apprentice
Apprentice


Joined: 14 May 2002
Posts: 206
Location: Milwaukee, WI

PostPosted: Wed May 15, 2002 8:28 pm    Post subject: Shell is not executable Reply with quote

Hi,
on suse I could type ./setup.sh in the KDE terminal, but now in Gentoo this does not work, I have to type sh setup.sh
Also in Suse I could click on a setup.sh on a CDROM and it would execute now I can't.

I am sure it's something I can set to get the same functionality in Gentoo.

Any Ideas?

Thanks,

Tony Caduto
Back to top
View user's profile Send private message
recluse
n00b
n00b


Joined: 18 Apr 2002
Posts: 18

PostPosted: Wed May 15, 2002 8:39 pm    Post subject: Reply with quote

Do you have execute permissions on the file? ls -l file.sh will show something like this :
-rw-r--r-- 1 recluse users 5008 May 14 19:12 foo.txt
Notice the lack of x's in where every 3rd - is? That means that I can't execute the file.
Do 'chmod u+x file.sh' to add execute permissions.

I *think* that should fix it. heh :lol:
_________________
=recluse=
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Wed May 15, 2002 9:10 pm    Post subject: Reply with quote

recluse wrote:
Do you have execute permissions on the file? ls -l file.sh will show something like this :
-rw-r--r-- 1 recluse users 5008 May 14 19:12 foo.txt
Notice the lack of x's in where every 3rd - is? That means that I can't execute the file.
Do 'chmod u+x file.sh' to add execute permissions.

I *think* that should fix it. heh :lol:


that should, yeah.

I'm sure it has a #!/bin/sh line at the top of it.
Back to top
View user's profile Send private message
snorkel
Apprentice
Apprentice


Joined: 14 May 2002
Posts: 206
Location: Milwaukee, WI

PostPosted: Wed May 15, 2002 10:37 pm    Post subject: Shell is not executable Reply with quote

Maybe I forgot to mention that the file is on a CDROM

Tony
Back to top
View user's profile Send private message
Nitro
Bodhisattva
Bodhisattva


Joined: 08 Apr 2002
Posts: 661
Location: San Francisco

PostPosted: Wed May 15, 2002 10:58 pm    Post subject: Reply with quote

Your cd is mounted with "noexec" right? What error messages do you get?
_________________
- Kyle Manna

Please, please SEARCH before posting.

There are three kinds of people in the world: those who can count, and those who can't.
Back to top
View user's profile Send private message
snorkel
Apprentice
Apprentice


Joined: 14 May 2002
Posts: 206
Location: Milwaukee, WI

PostPosted: Thu May 16, 2002 12:10 pm    Post subject: execute probs Reply with quote

The cd is mounted via fstab with user,exec
The problem is elswhere. I can't manually run any programs from the shell that load a .so even if they are in the same dir.

I am missing something from .bashrc or bash_profile that sets paths for this type of thing.
if i do a env I don't have any LD_LIBRARY_PATH, but I am not sure what to put in there.

Tony
Back to top
View user's profile Send private message
snorkel
Apprentice
Apprentice


Joined: 14 May 2002
Posts: 206
Location: Milwaukee, WI

PostPosted: Thu May 16, 2002 6:43 pm    Post subject: setup.sh from a cdrom won't run Reply with quote

I have a CD with a setup.sh, and on suse 8.0 I can just click on it in the KDE file manager and it launches the setup program.
On Gentoo it KDE just reports that setup.sh cannot be found and craps out.
My cdrom has exec in the fstab, I even copied all the files to my home dir and it still won't work.
All the permission are correct.
if I open a terminal and type ./setup.sh it starts to run but then dies becasue it can't find a .so that is in the same directory.

Why is it that it runs in Suse and Redhat , but not Gentoo. I am sure I have something configured wrong or not at all, but I don't know what.
This is a commercial CD that works on every other modern distribution.

Gentoo meets all the requirements for the program.

T
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Thu May 16, 2002 7:48 pm    Post subject: Reply with quote

Hmm.. well, it fails from the commandline, so thats probably why KDE is having issues with it through run.

As for why it is failing on the commandline, we need to use deduction. What application is it? Check out the setup.sh, what is it doing? usually it's something simple like a binary it's calling that is having the issue. If it is, you can run "ldd <binary name>" and it should tell you what libraries it's going to use. If any are missing, or something it'll tell you kinda rudely. :)
Back to top
View user's profile Send private message
snorkel
Apprentice
Apprentice


Joined: 14 May 2002
Posts: 206
Location: Milwaukee, WI

PostPosted: Thu May 16, 2002 8:09 pm    Post subject: setup.sh wont run from CDROM Reply with quote

it has everything it needs I checked all the dependencies, the executable it calls can't find the .so that's in the same directory.
It's starting to drive me nuts...

Tony
Back to top
View user's profile Send private message
klieber
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 3657
Location: San Francisco, CA

PostPosted: Thu May 16, 2002 8:27 pm    Post subject: Reply with quote

I would try two things:

  1. place a symlink of the .so file into your /usr/bin directory. This will tell you if it's a path issue or some other issue. (or, just cp the .so file to /usr/bin.)
  2. if that doesn't work, check your permissions again. I know you said you set them all correctly, but give it another shot. Just for giggles, set that entire folder to 777 if you can (use the -R flag) Again, that will tell you if its a permissions issue or not.

This may not completely solve the issue, but it should at least allow you to narrow down the cause of the problem.

--kurt
_________________
The problem with political jokes is that they get elected
Back to top
View user's profile Send private message
snorkel
Apprentice
Apprentice


Joined: 14 May 2002
Posts: 206
Location: Milwaukee, WI

PostPosted: Thu May 16, 2002 9:12 pm    Post subject: setup.sh from a cdrom won't run Reply with quote

I think I may have found the problem:
Kylix basically needs to have a file in /usr/lib or /lib named
libstdc++-libc6.1-1.so.2. This file should be a symbolic link
to the C++ library, which will also be in /usr/lib or /lib and
have a name that fits the pattern libstdc++*.so. So, for
example, if you look in /usr/lib and find a file called
libstdc++-3-libc6.1-2-2.10.so, you would enter the following
shell commands to create the symbolic link:

cd /usr/lib
ln -sf libstdc++-3-libc6.1-2-2.10.so libstdc++-libc6.1-1.so.2

If that fixes it I will post back for the benefit of others who may want to use Kylix in the future.
Back to top
View user's profile Send private message
tomte
Tux's lil' helper
Tux's lil' helper


Joined: 08 May 2002
Posts: 122

PostPosted: Thu May 16, 2002 11:25 pm    Post subject: Re: setup.sh wont run from CDROM Reply with quote

snorkel wrote:
it has everything it needs I checked all the dependencies, the executable it calls can't find the .so that's in the same directory.
It's starting to drive me nuts...

Tony


export LD_LIBRARY_PATH=/path/to/lib
prior to starting the script
(second underscore may be wrong)
Back to top
View user's profile Send private message
snorkel
Apprentice
Apprentice


Joined: 14 May 2002
Posts: 206
Location: Milwaukee, WI

PostPosted: Thu May 16, 2002 11:40 pm    Post subject: Found solution to the problem Reply with quote

The whole problem with the setup.sh has be resolved.
It was because the kernel was not compiled with MS joliet support for the CDROM, recompiled the kernel and everthing works as it should.

Kylix 2 installed perfectly after that change, it had nothing do with permissions or the LD_LIBRARY_PATH

Tony
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum