« 一个很有想法的基于JavaScript的WEB OS - JS/UIX | Main | proxy.ipcn.org 更新 acl 列表 »
August 27, 2005
环境变量 DISPLAY 与 BUILD RPM 包
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。 https://windtear.net/archives/2005/08/27/000756.html http://windtear.net/archives/2005/08/27/000756.html 一个没问题的 src rpm 包 build的时候出现错误提示: Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.24022 + umask 022 + cd /usr/src/redhat/BUILD + LANG=C + export LANG + unset DISPLAY error: Bad exit status from /var/tmp/rpm-tmp.24022 (%prep) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.24022 (%prep) 可以看出是 unset DISPLAY 时遇到环境变量 DISPLAY 根本就没定义导致的 #!/bin/sh RPM_SOURCE_DIR="/usr/src/redhat/SOURCES" RPM_BUILD_DIR="/usr/src/redhat/BUILD" RPM_OPT_FLAGS="-O2 -g -pipe -m32 -march=i386 -mtune=pentium4" RPM_ARCH="i386" RPM_OS="linux" export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS RPM_DOC_DIR="/usr/share/doc" export RPM_DOC_DIR RPM_PACKAGE_NAME="ipcnproxy" RPM_PACKAGE_VERSION="1.0.3" RPM_PACKAGE_RELEASE="1" export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE RPM_BUILD_ROOT="/var/tmp/ipcnproxy-1.0.3-root" export RPM_BUILD_ROOT set -x umask 022 cd /usr/src/redhat/BUILD LANG=C export LANG unset DISPLAY cd /usr/src/redhat/BUILD rm -rf ipcnproxy-1.0.3 比较快捷有效的解决办法那就随便export一个 DISPLAY 了事 |
Posted by windtear at August 27, 2005 6:48 PM