ubuntu安装时触发异常PACKAGE_VERSION is not defined

安装libtatsu过程中触发异常:

configure: error: PACKAGE_VERSION is not defined. Make sure to configure a source tree checked out from git or that .tarball-version is present.

 

原因:

问题根源在于 ​缺少 .tarball-version 文件,导致 configure 脚本无法识别包的版本信息。

错误 PACKAGE_VERSION is not defined 表明:

  1. 你使用的源码包可能未通过 git clone 获取(即未包含 Git 版本控制信息)
  2. 源码包缺少 .tarball-version 文件(通常在 Git 仓库中自动生成,但打包的源码可能遗漏)

解决:

1、生成版本号

cd libtatsu-1.0.4
echo "1.0.4" > .tarball-version  # 写入版本号

2、清理缓存,重新运行配置脚本

autoreconf -fiv  # 强制重新生成 configure 脚本
./configure --prefix=/usr/local

 

posted @ 2025-04-29 16:45  字节跳跳  阅读(49)  评论(0)    收藏  举报