修改/etc/paths

,想使用自己安装的版本,把path的先后顺序调整一下,/usr/local/bin放在最前面

1
2
3
4
5
6
cat /etc/paths
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin

转载于:https://www.cnblogs.com/yizhixuepython/p/9251659.html

root@ecm-e00f:/# sudo journalctl -u apparmor -xe --since "1 hour ago" | grep "AppArmor parser error" Jun 25 17:01:54 ecm-e00f apparmor.systemd[337880]: AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:01:54 ecm-e00f apparmor.systemd[337881]: AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:01:54 ecm-e00f apparmor.systemd[337883]: AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:01:54 ecm-e00f apparmor.systemd[337882]: AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:01:54 ecm-e00f apparmor.systemd[337903]: AppArmor parser error for /etc/apparmor.d/lsb_release in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:01:54 ecm-e00f apparmor.systemd[337907]: AppArmor parser error for /etc/apparmor.d/nvidia_modprobe in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:01:54 ecm-e00f apparmor.systemd[337911]: AppArmor parser error for /etc/apparmor.d/sbin.dhclient in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:01:54 ecm-e00f apparmor.systemd[337917]: AppArmor parser error for /etc/apparmor.d/usr.bin.man in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:04:33 ecm-e00f apparmor.systemd[338098]: AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:04:33 ecm-e00f apparmor.systemd[338099]: AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:04:33 ecm-e00f apparmor.systemd[338100]: AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:04:33 ecm-e00f apparmor.systemd[338101]: AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:04:33 ecm-e00f apparmor.systemd[338121]: AppArmor parser error for /etc/apparmor.d/lsb_release in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:04:33 ecm-e00f apparmor.systemd[338125]: AppArmor parser error for /etc/apparmor.d/nvidia_modprobe in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:04:33 ecm-e00f apparmor.systemd[338129]: AppArmor parser error for /etc/apparmor.d/sbin.dhclient in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:04:33 ecm-e00f apparmor.systemd[338135]: AppArmor parser error for /etc/apparmor.d/usr.bin.man in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:05:34 ecm-e00f apparmor.systemd[338205]: AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:05:34 ecm-e00f apparmor.systemd[338207]: AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:05:34 ecm-e00f apparmor.systemd[338206]: AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:05:34 ecm-e00f apparmor.systemd[338208]: AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:05:34 ecm-e00f apparmor.systemd[338228]: AppArmor parser error for /etc/apparmor.d/lsb_release in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:05:34 ecm-e00f apparmor.systemd[338232]: AppArmor parser error for /etc/apparmor.d/nvidia_modprobe in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:05:34 ecm-e00f apparmor.systemd[338236]: AppArmor parser error for /etc/apparmor.d/sbin.dhclient in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE Jun 25 17:05:34 ecm-e00f apparmor.systemd[338242]: AppArmor parser error for /etc/apparmor.d/usr.bin.man in profile /etc/apparmor.d/tunables/kernelvars at line 16: syntax error, unexpected TOK_SET_VAR, expecting TOK_END_OF_RULE
06-26
### 访问或修改 `qt.conf` 文件的方法 为了访问或修改位于特定路径下的 `qt.conf` 文件,需遵循一定流程以确保更改能够正确应用并影响 Qt 应用程序的行为。 #### 定位 `qt.conf` 通常情况下,要使自定义的 `qt.conf` 生效,应将其放置于生成的可执行文件所在的同一目录中[^3]。然而,对于已安装环境中存在的全局 `qt.conf` 或者其他位置中的配置文件,则可能需要管理员权限才能编辑它们。 #### 修改 `qt.conf` 假设目标是修改 `/etc/` 下面的 `qt.conf` 文件: 1. 使用文本编辑器打开该文件;如果是 Linux 系统上的 `/etc/qt.conf` ,则建议通过命令行工具如 `nano`, `vim` 来完成此操作,并且可能需要用超级用户权限(`sudo`)运行编辑器。 2. 编辑后的典型内容结构如下所示: ```ini [Paths] Prefix=/opt/qt5 Libraries=lib Plugins=plugins Data=data Translations=i18n ``` 上述示例指定了不同资源相对于前缀 (`Prefix`) 的相对路径。例如,翻译文件将被查找于 `/opt/qt5/i18n` 目录内[^4]。 #### 验证变更效果 保存所做的任何更动之后,可以通过重新启动受影响的应用程序来验证设置是否按预期工作。也可以编写一个小测试应用程序来打印出当前使用的库路径等信息,以此确认新配置已被采纳。 ```cpp #include <QLibraryInfo> #include <QDebug> int main() { qDebug() << "Qt Library Path:" << QLibraryInfo::location(QLibraryInfo::LibrariesPath); } ``` 这段简单的 C++ 代码片段展示了如何利用 `QLibraryInfo` 类查询实际加载的库路径,从而间接检验 `qt.conf` 设置的有效性。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值