FreeBSD:无法安装 Python 2.7

mor*_*ii2 5 freebsd python

我似乎无法在我的 FreeBSD 系统上安装 Python 2.7。这是一些信息:

# portsnap update
Ports tree is already up to date.
Run Code Online (Sandbox Code Playgroud)

版本:

# uname -r
7.1-RELEASE
Run Code Online (Sandbox Code Playgroud)

安装:

# cd /usr/ports/lang/python27/
# make
===>  Found saved configuration for python27-2.7.5_1
=> Python-2.7.5.tar.xz doesn't seem to exist in /usr/ports/distfiles/python.
=> Attempting to fetch ftp://ftp.lv.freebsd.org/pub/FreeBSD/distfiles/python/Python-2.7.5.tar.xz
Python-2.7.5.tar.xz                           100% of    9 MB  159 kBps 00m00s
===> Fetching all distfiles required by python27-2.7.5_1 for building
===>  Extracting for python27-2.7.5_1
=> SHA256 Checksum OK for python/Python-2.7.5.tar.xz.
===>   python27-2.7.5_1 depends on file: /usr/local/bin/xz - found
tar: Unrecognized archive format: Inappropriate file type or format
tar: Error exit delayed from previous errors.
*** Error code 1

Stop in /usr/ports/lang/python27.
*** Error code 1

Stop in /usr/ports/lang/python27.
Run Code Online (Sandbox Code Playgroud)

任何帮助都受到高度赞赏。

Tim*_*Tim 2

很可能是过时版本的症状。版本 7 有一个旧tar包,无法处理 .xz 扩展名。可以通过libarchive从 ports 安装,然后通过添加TAR=/usr/local/bin/bsdtar/etc/make.conf符号链接到bsdtar.