在 Debian 5.0 上安装 python 2.7.2
我在 debian 命令行中运行 ./make 命令来安装 python 2.7.2 时遇到一些问题。
我解压了从 Python.org 下载的文件并运行了 ./configure,这似乎工作得很好。不幸的是,当我输入 ./make 时,出现以下错误:
./make: No such file or directory
不确定为什么会发生这种情况,但我想获得 python 的更新版本以继续学习该语言。
谢谢你的帮助,
安迪
I'm having some trouble running the ./make command in my debian command line to install python 2.7.2.
I untarred my download from Python.org and ran ./configure which appeared to have worked fine. Unfortunately when I type in ./make I get the following error:
./make: No such file or directory
Not sure why this occurs, but I'd like to get an updated version of python to continue learning the language.
Thanks for your help,
Andy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当您输入
./configure
时,它会在当前目录(标有.
)中运行一个名为configure
的可执行脚本。Make 是一个可执行文件,通常位于
/usr/bin
之类的位置,它使用目录中的文件来运行一堆命令,具体取决于文件是否是最新的。当您只需输入
make
时,您的 shell(处理所有命令并将其输出发送到终端的程序)将查找PATH
环境变量中的所有目录查找名为make
的可执行文件,并运行找到的第一个文件。但是,当您输入./make
时,您实际上是在告诉它尝试运行当前目录中的一个名为make
的可执行文件。 (每当您在命令中放入/
时,它都会使用这种方法,而不是搜索PATH
变量。)您可以在任何地方使用
.
。可以使用普通目录来指定相同的目录,例如:/usr/bin/././././
与:/usr/bin
相同>。同样,可以使用..
来指定上面的目录,所以/usr/bin/../bin/../bin/../lib
是一样的如/usr/lib
。因此,在运行位于
./
中的configure
脚本(生成所谓的 makefile)后,您可以运行系统范围版本的make
,只需键入make
即可定位,它使用 makefile 来构建包。此外,您还可以使用
which
命令来查找当您单独输入命令时将运行的命令 - 例如which make
。(如果有任何居高临下的感觉,我深表歉意,我追求的是完整性。另外,我可能过度使用了代码标签......)
When you type
./configure
, it runs a executable script in the current directory (labeled with a.
) calledconfigure
.Make is an executable file, usually located somewhere like
/usr/bin
, which uses a file in the directory to run a bunch of commands depending on whether files are up to date.When you just type
make
, your shell (the program that handles all your commands and sends their output to the terminal) will go looking through all the directories in thePATH
environment variable to find an executable file calledmake
, and run the first one it finds. But, when you type./make
, you're actually telling it to try and run an executable file in the current directory, calledmake
. (It uses this approach, not searching thePATH
variable, whenever you put a/
in the command.)You can use the
.
anywhere you could use a normal directory to specify the same directory, so for example:/usr/bin/././././
is the same as:/usr/bin
. Similarly, you can use..
to specify the directory above, so/usr/bin/../bin/../bin/../lib
is the same as/usr/lib
.So, after running the
configure
script located in./
, which generates a so-called makefile, you run the system wide version ofmake
, located where ever, by just typingmake
, which uses the makefile to build the package.Also, you can use the
which
command to find out where the command that'll run when you enter a command by itself - for example,which make
.(Apologies if any of this is condescending, I was going for completism. Also, I may have overused the code tags...)
它不是 ./make
尝试
“make”,
因为它是
its not ./make
try
"make"
as it is