当前位置: 首页 > 工具软件 > Autojump > 使用案例 >

【Error】autojump遇到权限问题

孟成化
2023-12-01

错误log

$ Traceback (most recent call last):
  File "/usr/lib/python3.6/shutil.py", line 544, in move
    os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/tmp/tmpeygmf5e5' -> '/home/ubuntu/.local/share/autojump/autojump.txt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/autojump", line 320, in <module>
    sys.exit(main(parse_arguments()))
  File "/usr/bin/autojump", line 264, in main
    save(config, first(add_path(load(config), args.add)))
  File "/usr/share/autojump/autojump_data.py", line 138, in save
    move_file(temp.name, config['data_path'])
  File "/usr/share/autojump/autojump_utils.py", line 139, in move_file
    shutil.move(src, dst)
  File "/usr/lib/python3.6/shutil.py", line 558, in move
    copy_function(src, real_dst)
  File "/usr/lib/python3.6/shutil.py", line 257, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.6/shutil.py", line 121, in copyfile
    with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/home/ubuntu/.local/share/autojump/autojump.txt'

 

解决方案

sudo chown -R ubuntu:ubuntu .local/

参考

https://github.com/wting/autojump/issues/292

 

 类似资料: