制作没有任何依赖的 rpm 包。但是在环境中安装rpm包的时候,出现了缺少依赖的问题

Make rpm package without any dependencies. However when the rpm package is installed in the environment, there is a problem of missing dependencies

制作没有任何依赖的rpm包。但是在环境安装rpm包的时候,出现了缺少依赖的问题

我使用“--nodeps --force”来忽略rpm安装错误,但根本原因是什么?

缺少依赖的问题:

#  rpm -ivh 3cbb43448c0ad96c2c44ee01a7357cd248647f92e7ebc71531c26acacbe59d90.rpm 
Error: Dependency detection failed:
ld-linux-aarch64.so.1()(64bit) is tool-dawn-tce-deploy-1.0.5-20220318.114629.4e054de.x86_64 need
        ld-linux-aarch64.so.1(GLIBC_2.17)(64bit) is tool-dawn-tce-deploy-1.0.5-20220318.114629.4e054de.x86_64 need
        libdl.so.2(GLIBC_2.17)(64bit) is tool-dawn-tce-deploy-1.0.5-20220318.114629.4e054de.x86_64 need
        libpthread.so.0(GLIBC_2.17)(64bit) is tool-dawn-tce-deploy-1.0.5-20220318.114629.4e054de.x86_64 need

转速规格:

Name: tool-dawn-tce-deploy
Version: %{component_version}
Release: %{component_release}
Summary: tool-dawn-tce-deploy
Group: Applications/System
License: ASL 2.0
BuildArch: x86_64

%description
Dawn tools,Contains product atomic operations and deployment seq

%prep
git clone git@git.woa.com:tce.ted/ted.dawn.git -b release/tce3.8.0
mv ted.dawn/tool/tool-dawn-tce-deploy ./tool-dawn-tce-deploy
rm -rf ted.dawn

%build
#nothing required

%install
mkdir -p %{buildroot}%{_bindir}
cp -rf ./tool-dawn-tce-deploy %{buildroot}%{_bindir}

%files
%defattr(-,root,root,-)
%{_bindir}/tool-dawn-tce-deploy
%pre

%post

%preun

%postun

%check

%clean

%changelog

您要查找的是禁用 internal dependency generator:

%global _use_internal_dependency_generator 0

也就是说,除非您确保这些库可以访问,否则您的二进制文件将无法工作。

如果您希望它没有依赖性 并且 不在包内运送库,您需要静态构建它。例如。 -static gcc 的选项。