crontab: no crontab for veryv - using an empty one
crontab: "/usr/bin/vi" exited with status 1
How do I fix this issue on a Linux or Unix-like systems?
You need to set correct environment variable called EDITOR. It appers that either vi is not installed or /usr/bin/vi is a symbolic link to vim editor. To edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables, enter:
$ crontab -e
But, if EDITOR or VISUAL is not set, so you will see an error as follows:
So to fix this error and use vim as a text editor, type (bash/sh/ksh shell specific syntax):
OR if you are using emacs editor, run:
Or if you are using nano text editor, enter:
Finally, try to edit or set new cron jobs, enter:
I recommend that you edit your shell ~/.bashrc file and append the following line:
export EDITOR=vim
OR if you are using emacs editor, run:
export EDITOR=emacs
Or if you are using nano text editor, enter:
export EDITOR=nano
Finally, try to edit or set new cron jobs, enter:
crontab -e
I recommend that you edit your shell ~/.bashrc file and append the following line:
export EDITOR=vim
0 comments:
Post a Comment