"bad interpreter: Input/output error"
Jeff
atrocity at wywh.com
Sat Jan 13 21:49:31 UTC 2024
On 1/13/24 09:01, Ian Bruntlett wrote:
> 0. I've done some searching about this. I think it is down to you
> storing your scripts on a NAS drive.
They've been there for years, though. And two other Linux boxes (a
nettop running Ubuntu Server and a Raspberry Pi 4 running Raspberry Pi
OS) can execute them just fine.
> Can you copy a script from the NAS drive and see if it will run OK
> from a local drive's directory?
I copied one to my home directory and it actually does work, so that's a
major point in favor of the NAS location causing the problem theory. But:
> I think the NAS drive might be mounting as "noexec"
No, definitely not. That's the real source of frustration here: I've
been doing it this way for *years* and haven't had any need or desire to
fiddle with it recently. It worked before the most recent update+reboot
and hasn't since. I just now went in and explicitly added "exec" to my
fstab line, unmounted and remounted, but that didn't change anything.
> 1. What is the output of:
> which python3
/usr/bin/python3
I had the same thought, though. I wondered if the Python location had
somehow changed due to the update or something, unlikely though that may be.
> 2. When you run test.py, and get the Input/Output error, what is the
output of this command:
> echo $?
126
Which is interesting since that apparently points to a permissions
problem. But again:
-rwxr-xr-x 1 <user> <group> 47 Jan 12 14:22
/mnt/WD8TBNAS03/Documents/ShellScripts/test.py
> 3. Try this as a script and see if it works:
> #!/usr/bin/env python3
> print ("Hello")
Same error, same 126 return code.
> 4, Try this - it should get you into the python command line:
> $ env --debug python3
It did and I got the below, but I'm not sure what do do with it:
$ env --debug python3
executing: python3
arg[0]= ‘python3’
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
Thanks again for the help! Normally by the point I've spent this much
time on something I realize "Oh, that's right, I did Some Stupid Thing!"
but that's just not the case here. It was literally "Everything's fine,
but I'll check for updates. Oh, there are some! OK, I'll install them.
Needs a reboot? No problem!" Then it simply stopped working the way it
previously worked for years, even after a second reboot. I just did
another update but what got installed seems unrelated and the problem
persists.
More information about the ubuntu-users
mailing list