安装Jenkins启动出现错误提示 AWT is not properly configured on this server. Perhaps you need to run your container with “-Djava.awt.headless=true”? See also: https://www.jenkins.io/redirect/troubleshooting/java.awt.headless;
报错信息如下:
解决方案:yum install fontconfig
[root@localhost ~]# yum install fontconfig
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package fontconfig.x86_64 0:2.13.0-4.3.el7 will be installed
--> Processing Dependency: fontpackages-filesystem for package: fontconfig-2.13.0-4.3.el7.x86_64
--> Processing Dependency: dejavu-sans-fonts for package: fontconfig-2.13.0-4.3.el7.x86_64
--> Running transaction check
---> Package dejavu-sans-fonts.noarch 0:2.33-6.el7 will be installed
--> Processing Dependency: dejavu-fonts-common = 2.33-6.el7 for package: dejavu-sans-fonts-2.33-6.el7.noarch
---> Package fontpackages-filesystem.noarch 0:1.44-8.el7 will be installed
--> Running transaction check
---> Package dejavu-fonts-common.noarch 0:2.33-6.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================================================================================================================
Package Arch Version Repository Size
===========================================================================================================================================================================================
Installing:
fontconfig x86_64 2.13.0-4.3.el7 base 254 k
Installing for dependencies:
dejavu-fonts-common noarch 2.33-6.el7 base 64 k
dejavu-sans-fonts noarch 2.33-6.el7 base 1.4 M
fontpackages-filesystem noarch 1.44-8.el7 base 9.9 k
Transaction Summary
===========================================================================================================================================================================================
Install 1 Package (+3 Dependent packages)
Total download size: 1.7 M
Installed size: 5.9 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): dejavu-fonts-common-2.33-6.el7.noarch.rpm | 64 kB 00:00:03
(2/4): fontconfig-2.13.0-4.3.el7.x86_64.rpm | 254 kB 00:00:07
(3/4): fontpackages-filesystem-1.44-8.el7.noarch.rpm | 9.9 kB 00:00:00
(4/4): dejavu-sans-fonts-2.33-6.el7.noarch.rpm | 1.4 MB 00:00:14
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 119 kB/s | 1.7 MB 00:00:14
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : fontpackages-filesystem-1.44-8.el7.noarch 1/4
Installing : dejavu-fonts-common-2.33-6.el7.noarch 2/4
Installing : dejavu-sans-fonts-2.33-6.el7.noarch 3/4
Installing : fontconfig-2.13.0-4.3.el7.x86_64 4/4
Verifying : fontpackages-filesystem-1.44-8.el7.noarch 1/4
Verifying : dejavu-fonts-common-2.33-6.el7.noarch 2/4
Verifying : fontconfig-2.13.0-4.3.el7.x86_64 3/4
Verifying : dejavu-sans-fonts-2.33-6.el7.noarch 4/4
Installed:
fontconfig.x86_64 0:2.13.0-4.3.el7
Dependency Installed:
dejavu-fonts-common.noarch 0:2.33-6.el7 dejavu-sans-fonts.noarch 0:2.33-6.el7 fontpackages-filesystem.noarch 0:1.44-8.el7
Complete!
重启
[root@localhost ~]# sudo systemctl restart jenkins
重新登录
参考链接:https://blog.csdn.net/qq_44959735/article/details/104363491