FreeBSD:无法安装 Python 2.7

FreeBSD:无法安装 Python 2.7

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

# portsnap update
Ports tree is already up to date.

版本:

# uname -r
7.1-RELEASE

安装:

# 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.

非常感谢任何帮助。

答案1

很可能是过时版本的症状。版本 7 有一个旧tar包,无法处理 .xz 扩展名。可以通过libarchive从 ports 安装然后通过添加或符号链接到 .libarchives tar 将 libarchives tar 设置为默认的 tar 二进制文件来TAR=/usr/local/bin/bsdtar实现/etc/make.conf解决bsdtar方法。

相关内容