一般来说,Unity编辑器的安装,官方已经给出了安装教程。
但是这个忽略了RHEL 9的一个特性:默认的加解密策略已经不支持SHA1了,你会在执行yum install unityhub那里出现如下报错:
- [shepherd@localhost ~]$ sudo yum install unityhub
- \Last metadata expiration check: 0:00:05 ago on Mon 01 Jul 2024 12:39:57 AM CST.
- Dependencies resolved.
- ================================================================================
- Package Architecture Version Repository Size
- ================================================================================
- Installing:
- unityhub x86_64 3.8.0-1 unityhub 110 M
- Installing dependencies:
- libXScrnSaver x86_64 1.2.3-10.el9 appstream 25 k
-
- Transaction Summary
- ================================================================================
- Install 2 Packages
-
- Total download size: 110 M
- Installed size: 434 M
- Is this ok [y/N]: y
- Is this ok [y/N]: y
- Downloading Packages:
- (1/2): libXScrnSaver-1.2.3-10.el9.x86_64.rpm 42 kB/s | 25 kB 00:00
- (2/2): unityhub-x86_64-3.8.0.rpm 8.4 MB/s | 110 MB 00:13
- --------------------------------------------------------------------------------
- Total 7.8 MB/s | 110 MB 00:14
- Unity Hub 3.2 kB/s | 3.1 kB 00:00
- Importing GPG key 0x34E8243F:
- Userid : "Unity Technologies ApS
" - Fingerprint: A08C A7CD 4D00 6A41 28EC 2850 BE3E 6EA5 34E8 243F
- From : https://hub.unity3d.com/linux/repos/rpm/stable/repodata/repomd.xml.key
- Is this ok [y/N]: y
- Key imported successfully
- warning: Signature not supported. Hash algorithm SHA1 not available.
- warning: Signature not supported. Hash algorithm SHA1 not available.
- Import of key(s) didn't help, wrong key(s)?
- Problem opening package unityhub-x86_64-3.8.0.rpm. Failing package is: unityhub-3.8.0-1.x86_64
- GPG Keys are configured as: https://hub.unity3d.com/linux/repos/rpm/stable/repodata/repomd.xml.key
- The downloaded packages were saved in cache until the next successful transaction.
- You can remove cached packages by executing 'yum clean packages'.
- Error: GPG check FAILED
解决方法很简单,将默认的crypto策略改称SHA1即可。
- [shepherd@localhost ~]$ sudo update-crypto-policies --set DEFAULT:SHA1
- Setting system policy to DEFAULT:SHA1
- Note: System-wide crypto policies are applied on application start-up.
- It is recommended to restart the system for the change of policies
- to fully take place.
然后重试命令。