Ubuntu20.04上IDEA报Unable to save settings: Failed to save settings. Please restart IntelliJ IDEA 解决方案

本文提供了解决IntelliJ IDEA在Ubuntu环境下无法保存设置的问题方案,包括检查配置目录、卸载问题插件及调整工作目录权限等步骤。

Unable to save settings: Failed to save settings. Please restart IntelliJ IDEA 解决方案
ubuntu 上 今天使用idea,报错
google上说可能是压缩包损坏,但是重新下载之后依然报错

基本有以下几种解决方法,对症下药

1 配置目录出错:删除掉配置目录,例如安装的是idea最新的15.1版本,就删除 .ideaIC这个文件夹,重启解决了

2 插件出错:插件 identifier Highlighter,rust都可能报错,卸载即可

3.本身工作目录权限问题,导致idea不能保存配置 需要sudo chmod -R 777 $PWD

### Ubuntu 20.04 中 ntp.service 被 masked 的解决方案Ubuntu 20.04 中,`ntp.service` 被标记为 `masked` 是一个常见的问题。这通常是因为系统管理员或安装过程中禁用了该服务,或者系统使用了替代的时间同步服务(如 `systemd-timesyncd`)。以下是解决此问题的详细方法: #### 1. 检查当前状态 首先,检查 `ntp.service` 的状态以确认其是否被标记为 `masked`: ```bash systemctl status ntp.service ``` 如果输出中包含 `masked`,则需要解除该状态[^1]。 #### 2. 解除 masked 状态 要解除 `ntp.service` 的 `masked` 状态,可以执行以下命令: ```bash sudo systemctl unmask ntp.service ``` 此命令会将符号链接从 `/dev/null` 移除,并恢复到默认状态[^1]。 #### 3. 安装并启用 NTP 服务 如果系统中尚未安装 `ntp` 包,则需要先安装它: ```bash sudo apt-get update sudo apt-get install ntp ``` 安装完成后,启动并启用 `ntp.service`: ```bash sudo systemctl start ntp.service sudo systemctl enable ntp.service ``` #### 4. 验证时间同步功能 确保 NTP 服务正在运行且时间同步正常: ```bash timedatectl status ``` 输出中应显示 `NTP synchronized: yes`,表明时间同步成功[^2]。 #### 5. 替代方案:使用 `systemd-timesyncd` 如果系统中启用了 `systemd-timesyncd`,可能会导致冲突。可以通过以下步骤切换到 `systemd-timesyncd`: - 停止并禁用 `ntp.service`: ```bash sudo systemctl stop ntp.service sudo systemctl disable ntp.service ``` - 启用并启动 `systemd-timesyncd`: ```bash sudo systemctl enable systemd-timesyncd sudo systemctl start systemd-timesyncd ``` #### 注意事项 - 如果需要自定义时间服务器,请编辑 `/etc/systemd/timesyncd.conf` 文件[^3]。 - 在某些情况下,可能需要重启系统以确保更改生效。 ```bash sudo nano /etc/systemd/timesyncd.conf ``` 添加或修改 `[Time]` 部分中的 `Servers` 参数,例如: ```ini [Time] Servers=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值