使rpm包没有任何依赖项。但是,当rpm包安装在环境中时,就会出现缺少依赖项的问题。
我使用“--nodeps -强制”来忽略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 needrpm规范:
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发布于 2022-03-18 09:52:29
你要找的是禁用内部依赖产生器
%global _use_internal_dependency_generator 0也就是说,除非您确保那些库是可以访问的,否则二进制文件将无法工作。
如果您希望它没有依赖关系,并且不在包中提供库,则需要静态地构建它。例如,-static选项用于gcc。
https://stackoverflow.com/questions/71524293
复制相似问题