我正在尝试按照安装指南中给出的步骤进行操作 http://opencv.willowgarage.com/wiki/InstallGuide_Linux 在尝试进行路径配置时,我尝试在 /etc/ld.so.conf.d/ 中创建一个包含单行 /usr/local/lib 的 opencv.conf 文件。但是,一旦保存它,就会收到错误消息:
vineet@vineet-XPS-M1530 /etc/ld.so.conf.d $ sudo gedit opencv.conf
(gedit:3765): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.L45S9V': No such file or directory
(gedit:3765): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
(gedit:3765): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.U5FA9V': No such file or directory
(gedit:3765): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
(gedit:3765): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.2ITB9V': No such file or directory
(gedit:3765): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
vineet@vineet-XPS-M1530 /etc/ld.so.conf.d $
我是 Linux 新手。请告诉我该怎么做。
答案1
这是因为您正在sudo
使用图形文本编辑器打开文件。
当您关闭时,gedit
它会尝试将最近的文件(您正在编辑的文件)保存到最近编辑的文件历史记录中。由于该文件不存在,因此会失败。
解决方案是使用gksudo
具有权限和用户配置的图形应用程序来打开sudo
。
gksudo gedit opencv.conf
使用而不是 来打开文件sudo gedit opencv.conf
。