我正在尝试为每个包创建一个 Mono 安装包,因为 CentOS 服务器无法访问互联网。但是,当我尝试使用以下命令安装单核心包时:
rpm -i mono-core-4.8.1.0-0.xamarin.1.x86_64.rpm
系统显示以下错误信息:
error: Failed dependencies:
mono(System.ComponentModel.Composition) = 4.0.0.0 is needed by mono-core-4.8.1.0-0.xamarin.1.x86_64
mono(System.ComponentModel.DataAnnotations) = 4.0.0.0 is needed by mono-core-4.8.1.0-0.xamarin.1.x86_64
mono(System.Data) = 4.0.0.0 is needed by mono-core-4.8.1.0-0.xamarin.1.x86_64
mono(System.IdentityModel) = 4.0.0.0 is needed by mono-core-4.8.1.0-0.xamarin.1.x86_64
mono(System.Runtime.Serialization) = 4.0.0.0 is needed by mono-core-4.8.1.0-0.xamarin.1.x86_64
mono(System.ServiceModel) = 4.0.0.0 is needed by mono-core-4.8.1.0-0.xamarin.1.x86_64
mono(System.ServiceProcess) = 4.0.0.0 is needed by mono-core-4.8.1.0-0.xamarin.1.x86_64
如何解决这些依赖关系?
更新
我正在尝试使用这个命令:
yum localinstall mono-core-4.8.1.0-0.xamarin.1.x86_64.rpm
结果:
Examining mono-core-4.8.1.0-0.xamarin.1.x86_64.rpm: mono-core-4.8.1.0-0.xamarin.1.x86_64
Marking mono-core-4.8.1.0-0.xamarin.1.x86_64.rpm to be installed
Resolving Dependencies
Running transaction check
Package mono-core.x86_64 0:4.8.1.0-0.xamarin.1 will be installed
Processing Dependency: mono(System.ComponentModel.Composition) = 4.0.0.0 for package: mono-core-4.8.1.0-0.xamarin.1.x86_64
Processing Dependency: mono(System.ComponentModel.DataAnnotations) = 4.0.0.0 for package: mono-core-4.8.1.0-0.xamarin.1.x86_64
Processing Dependency: mono(System.Data) = 4.0.0.0 for package: mono-core-4.
Processing Dependency: mono(System.IdentityModel) = 4.0.0.0 for package: mono-core-4.8.1.0-0.xamarin.1.x86_64
Processing Dependency: mono(System.Runtime.Serialization) = 4.0.0.0 for package: mono-core-4.8.1.0-0.xamarin.1.x86_64
Processing Dependency: mono(System.ServiceModel) = 4.0.0.0 for package: mono-core-4.8.1.0-0.xamarin.1.x86_64
Processing Dependency: mono(System.ServiceProcess) = 4.0.0.0 for package: mono-core-4.8.1.0-0.xamarin.1.x86_64
Finished Dependency Resolution
Error: Package: mono-core-4.8.1.0-0.xamarin.1.x86_64 (/mono-core-4.8.1.0-0.xamarin.1.x86_64) Requires: mono(System.Data) = 4.0.0.0
Error: Package: mono-core-4.8.1.0-0.xamarin.1.x86_64 (/mono-core-4.8.1.0-0.xamarin.1.x86_64) Requires: mono(System.ComponentModel.DataAnnotations) = 4.0.0.0
Error: Package: mono-core-4.8.1.0-0.xamarin.1.x86_64 (/mono-core-4.8.1.0-0.xamarin.1.x86_64) Requires: mono(System.IdentityModel) = 4.0.0.0
Error: Package: mono-core-4.8.1.0-0.xamarin.1.x86_64 (/mono-core-4.8.1.0-0.xamarin.1.x86_64) Requires: mono(System.ServiceModel) = 4.0.0.0
Error: Package: mono-core-4.8.1.0-0.xamarin.1.x86_64 (/mono-core-4.8.1.0-0.xamarin.1.x86_64) Requires: mono(System.ComponentModel.Composition) = 4.0.0.0
Error: Package: mono-core-4.8.1.0-0.xamarin.1.x86_64 (/mono-core-4.8.1.0-0.xamarin.1.x86_64) Requires: mono(System.Runtime.Serialization) = 4.0.0.0
Error: Package: mono-core-4.8.1.0-0.xamarin.1.x86_64 (/mono-core-4.8.1.0-0.xamarin.1.x86_64) Requires: mono(System.ServiceProcess) = 4.0.0.0
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
答案1
尝试一下yum localinstall mono-core-4.8.1.0-0.xamarin.1.x86_64.rpm
,理想情况下yum
会为您找到并获取依赖项。
答案2
您可以尝试使用 --skip-broken 来解决您可以强制安装软件包但稍后可能会出现依赖项问题的问题。