在 Debian 5.0 上安装 python 2.7.2

发布于 2024-12-04 23:07:22 字数 278 浏览 0 评论 0原文

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

两个我 2024-12-11 23:07:22

当您输入 ./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 .) called configure.

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 the PATH environment variable to find an executable file called make, 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, called make. (It uses this approach, not searching the PATH 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 of make, located where ever, by just typing make, 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...)

娇女薄笑 2024-12-11 23:07:22

它不是 ./make

尝试

“make”,

因为它是

its not ./make

try

"make"

as it is

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文