![更正](https://linux22.com/image/1100967/%E6%9B%B4%E6%AD%A3.png)
绝对路径,失败:
nan@UXN:~$ python /home/nan/google_appengine/goagent/local/proxy.py
python: can't open file '/home/nan/google_appengine/goagent/local/proxy.py': [Errno 2] No such file or directory
相对路径,也失败:
nan@UXN:~$ cd /home/nan/google_appengine/goagent/local
nan@UXN:~/google_appengine/goagent/local$ python proxy.py
python: can't open file 'proxy.py': [Errno 2] No such file or directory
我读过一些解决方案,他们说这是一个共同的问题。然后我运行:
sudo apt-get install libc6-i386 lib32gcc1 lib32z1 lib32stdc++6 ia32-libs
但仍然失败。我该怎么办?谢谢。
nan@UXN:~$ ls -alhs /home/nan/google_appengine/goagent/local/
total 6.3M
4.0K drwx------ 3 nan nan 4.0K Dec 15 10:59 .
4.0K drwx------ 4 nan nan 4.0K Dec 15 10:59 ..
4.0K -rw------- 1 nan nan 2.7K Dec 12 23:58 addto-startup.js
4.0K -rw------- 1 nan nan 3.3K Dec 12 23:58 addto-startup.py
248K -rw------- 1 nan nan 245K Dec 12 23:58 cacert.pem
4.0K -rw------- 1 nan nan 2.9K Dec 12 23:58 CA.crt
4.0K drwx------ 2 nan nan 4.0K Dec 16 19:37 certs
24K -rw------- 1 nan nan 24K Dec 12 23:58 goagent.exe
16K -rw------- 1 nan nan 13K Dec 12 23:58 goagent-gtk.py
8.0K -rw------- 1 nan nan 6.9K Dec 12 23:58 goagent-osx.command
4.0K -rw------- 1 nan nan 411 Dec 12 23:58 Microsoft.VC90.CRT.manifest
644K -rw------- 1 nan nan 641K Dec 12 23:58 msvcr90.dll
4.0K -rw------- 1 nan nan 62 Dec 12 23:58 proxy.bat
8.0K -rw------- 1 nan nan 4.4K Dec 15 11:07 proxy.ini
416K -rw------- 1 nan nan 413K Dec 23 11:17 proxy.pac
132K -rwx--x--x 1 nan nan 132K Dec 12 23:58 proxy.py
4.0K -rw------- 1 nan nan 1.6K Dec 12 23:58 proxy.sh
2.4M -rw------- 1 nan nan 2.4M Dec 12 23:58 python27.dll
44K -rw------- 1 nan nan 43K Dec 12 23:58 python27.exe
2.2M -rw------- 1 nan nan 2.2M Dec 12 23:58 python27.zip
8.0K -rw------- 1 nan nan 5.8K Dec 12 23:58 SwitchyOptions.bak
184K -rw------- 1 nan nan 182K Dec 12 23:58 SwitchySharp.crx
4.0K -rw------- 1 nan nan 134 Dec 12 23:58 uvent.bat
答案1
这是一个相当传统的权限问题。
在尝试运行文件之前,你应该使它可执行。只需执行chmod +x /home/nan/google_appengine/goagent/local/proxy.py
。这将赋予此文件可执行的权限 (x)。
如果你问我,不要运行这些本地脚本sudo
。除非你 100% 确定它们不会对你的系统造成任何损害。
更正
嗯。我刚刚又看了一遍你的问题,你的 proxy.py 已经有可执行权限了……所以这不是问题所在。抱歉。欢迎提出任何建议。