在CentOS系统中,LibreOffice启动问题可能由多种原因引起。以下是一些常见的原因及其解决方法:
sudo mv /path/to/xpfonts /usr/share/fonts/
sudo chmod u+rwx /usr/share/fonts/xpfonts/*
cd /usr/share/fonts/xpfonts
sudo mkfontscales
sudo mkfontdirs
sudo fc-cache -fv
libSM.so.6
。sudo yum install libreoffice-headless
/etc/default/locale
文件,确保语言环境设置正确:LANG="en_US.UTF-8"
LANGUAGE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="en_US.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
rc.local
或systemctl
设置开机自启动。例如,使用rc.local
:sudo chmod +x /etc/rc.d/rc.local
vi /etc/rc.d/rc.local
# 添加启动LibreOffice的命令
/opt/libreoffice/program/soffice --headless --accept "socket,host127.0.0.1,port8100;urp;" --nofirststartwizard &
systemctl
:sudo vi /etc/systemd/system/libreoffice.service
# 添加以下内容
[Unit]
Description=LibreOffice
After=network.target
[Service]
ExecStart=/opt/libreoffice/program/soffice --headless --accept "socket,host127.0.0.1,port8100;urp;" --nofirststartwizard
[Install]
WantedBy=multi-user.target
sudo systemctl start libreoffice
sudo systemctl enable libreoffice
通过检查并解决上述问题,通常可以恢复LibreOffice的正常启动。如果问题仍然存在,建议查看系统日志以获取更多详细的错误信息,并根据具体情况进行进一步的排查。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>