Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux RPM&x2B;生成RPM时出错_Linux - Fatal编程技术网

Linux RPM&x2B;生成RPM时出错

Linux RPM&x2B;生成RPM时出错,linux,Linux,请告知我为什么会出现错误“错误文件:/root/rpmbuild/SOURCES/test.sh” 我需要创建rpm文件 我只有SPECS下的spec文件 以及SOURCES下的test.sh脚本 这里怎么了 [root@linux /usr/src/redhat]# ls BUILD RPMS SOURCES SPECS SRPMS 等级库文件: Summary: An example tool. To show a simple rpm build of the tool.

请告知我为什么会出现错误“错误文件:/root/rpmbuild/SOURCES/test.sh”

我需要创建rpm文件

我只有SPECS下的spec文件

以及SOURCES下的test.sh脚本

这里怎么了

 [root@linux /usr/src/redhat]# ls

 BUILD  RPMS  SOURCES  SPECS  SRPMS
等级库文件:

Summary: An example tool. To show a simple rpm build of the tool.
Name: test.sh
Version: 6.2
Release: 2
Source:/root/test.sh
Group: Development/Debuggers
BuildRoot:/var/tmp/test.sh
%description


Bad file: /root/rpmbuild/SOURCES/test.sh: No such file or directory RPM build     errors:    Bad file: /root/rpmbuild/SOURCES/test.sh: No such file or directory

通往源头的道路永远不会被使用;所有源文件必须在
%{u sourcedir}
中,与路径的最后一个组件同名。

从未使用到源的路径;所有源文件必须在
%{u sourcedir}
中,与路径的最后一个组件同名。

因此需要更新规范文件吗?%{u sourcedir}代替Source:/root/test.sh??不,必须将test.sh放在该目录中
rpm-E“%{sourcedir}”
但是test.sh已经在/usr/src/redhat/SOURCES中,正如您所说-:(我将/usr/src/redhat/SOURCES/test.sh复制到/root/rpmbuild/SOURCES/test.sh,所以需要更新规范文件?%{u sourcedir}代替Source:/root/test.sh??不,您必须将test.sh放在该目录中。
rpm-E“%{sourcedir}”
但是test.sh已经在/usr/src/redhat/SOURCES中,正如您所说-:(我将/usr/src/redhat/SOURCES/test.sh复制到/root/rpmbuild/SOURCES/test.sh