我需要一个脚本,它将在Linux系统中从源代码安装一个软件包,并且需要知道如何处理通常由于第一步而出现的错误./configure也许一个软件包缺less他的意志杀死进程,不会完全configuration来自给定源的包。
我有一个脚本,这是一个正常的bash组织
我需要帮助,以确保例如如果包是GNUCASH和运行./configure返回
Package libxml-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `libxml-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'libxml-2.0' found configure: error: Library requirements (libxml-2.0 >= 2.5.10) not met;consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
我的脚本会照顾缺失的libxml包,或者至less帮助最终用户自动排除过程,以确保BUILD过程的所有步骤都已完成,并且可能发生的每个错误都将被处理。
我想你应该首先安装依赖关系,因为你知道需要什么包,而不是用户。