Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #273062 > unrolled thread
| Started by | Marcus Park <marp@privatembox.com> |
|---|---|
| First post | 2024-09-13 23:50 +0200 |
| Last post | 2024-09-14 10:50 +0200 |
| Articles | 9 — 5 participants |
Back to article view | Back to linux.debian.user
unwanted crontab message Marcus Park <marp@privatembox.com> - 2024-09-13 23:50 +0200
Re: unwanted crontab message Andy Smith <andy@strugglers.net> - 2024-09-14 00:00 +0200
Re: unwanted crontab message Marcus Park <marp@privatembox.com> - 2024-09-14 00:20 +0200
Re: unwanted crontab message Will Mengarini <seldon@eskimo.com> - 2024-09-14 00:50 +0200
Re: unwanted crontab message Will Mengarini <seldon@eskimo.com> - 2024-09-14 01:00 +0200
Re: unwanted crontab message Andy Smith <andy@strugglers.net> - 2024-09-14 00:50 +0200
Re: unwanted crontab message Greg Wooledge <greg@wooledge.org> - 2024-09-14 03:00 +0200
Re: unwanted crontab message Greg Wooledge <greg@wooledge.org> - 2024-09-14 00:00 +0200
Re: unwanted crontab message Michael Kjörling <c9bc136c6063@ewoof.net> - 2024-09-14 10:50 +0200
| From | Marcus Park <marp@privatembox.com> |
|---|---|
| Date | 2024-09-13 23:50 +0200 |
| Subject | unwanted crontab message |
| Message-ID | <JmmkV-c47r-1@gated-at.bofh.it> |
Hi list, When I run 'crontab -e' the screen shows some errors like, $ crontab -e Error detected while processing /usr/share/vim/vim82/filetype.vim: line 10: E319: Sorry, the command is not available in this version: let did_load_filetypes = 1 line 13: E319: Sorry, the command is not available in this version: let s:cpo_save = &cpo line 47: E319: Sorry, the command is not available in this version: func! s:StarSetf(ft) line 51: E319: Sorry, the command is not available in this version: endfunc line 2440: E319: Sorry, the command is not available in this version: func! TestFiletypeFuncs(testlist) line 2441: E319: Sorry, the command is not available in this version: let output = '' line 2442: E319: Sorry, the command is not available in this version: for f in a:testlist ... (and many other lines) how to fix up it? Thanks.
[toc] | [next] | [standalone]
| From | Andy Smith <andy@strugglers.net> |
|---|---|
| Date | 2024-09-14 00:00 +0200 |
| Message-ID | <JmmuB-c4du-11@gated-at.bofh.it> |
| In reply to | #273062 |
Hi,
On Sat, Sep 14, 2024 at 05:44:42AM +0800, Marcus Park wrote:
> When I run 'crontab -e' the screen shows some errors like,
>
> $ crontab -e
> Error detected while processing /usr/share/vim/vim82/filetype.vim:
I'm pretty sure that these errors will be coming from the editor
binary that is set in your VISUAL or EDITOR environment variables,
or failing thatm whatever /usr/bin/editor points at.
man crontab
The -e option is used to edit the current crontab using the
editor specified by the VISUAL or EDITOR environ‐ ment
variables. After you exit from the editor, the modified crontab
will be installed automatically. If neither of the
environment variables is defined, then the default editor
/usr/bin/editor is used.
> how to fix up it?
Set EDITOR or VISUAL to an editor that works.
export EDITOR=nano
or whatever you prefer.
As to why whatever it is set as right now is doing that, first work
out where it is getting the setting from, so echo $EDITOR and echo
$VISUAL. If neither of those are set then ls -la /usr/bin/editor.
I'll guess that you have vim-tiny or some other very minimal vi
clone installed but still somehow have vim-runtime installed and
it's trying to use that while not being able to parse it.
So either use a different editor or fix that editor or remove
vim-runtime, I suppose.
Thanks,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting
[toc] | [prev] | [next] | [standalone]
| From | Marcus Park <marp@privatembox.com> |
|---|---|
| Date | 2024-09-14 00:20 +0200 |
| Message-ID | <JmmNX-c4za-1@gated-at.bofh.it> |
| In reply to | #273063 |
Andy Smith : > As to why whatever it is set as right now is doing that, first work > out where it is getting the setting from, so echo $EDITOR and echo > $VISUAL. If neither of those are set then ls -la /usr/bin/editor. Thanks Andy. either $EDITOR or $VISUAL in my system is empty. And /usr/bin/editor points to nano. Then I run this command, $ sudo update-alternatives --config editor There are 4 choices for the alternative editor (providing /usr/bin/editor). Selection Path Priority Status ------------------------------------------------------------ * 0 /bin/nano 40 auto mode 1 /bin/ed -100 manual mode 2 /bin/nano 40 manual mode 3 /usr/bin/vim.basic 30 manual mode 4 /usr/bin/vim.tiny 15 manual mode Press <enter> to keep the current choice[*], or type selection number: 3 update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in manual mode to choose vim.basic as default editor. In my system both vim.basic and vim are the same stuff, $ vim --version VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Aug 27 2024 05:34:22) Included patches: 1-16, 647, 17-579, 1969, 580-647, 678, 648-1848, 4975, 5016, 5023, 5072, 2068, 1849-1854, 1857, 1855-1857, 1331, 1858, 1858-1859, 1873, 1860-1969, 1992, 1970-1992, 2010, 1993-2068, 2106, 2069-2106, 2108, 2107-2109, 2109-3995, 4563, 4646, 4774, 4895, 4899, 4901, 4919, 213, 1840, 1846-1847, 2110-2112, 2121 ... $ vim.basic --version VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Aug 27 2024 05:34:22) Included patches: 1-16, 647, 17-579, 1969, 580-647, 678, 648-1848, 4975, 5016, 5023, 5072, 2068, 1849-1854, 1857, 1855-1857, 1331, 1858, 1858-1859, 1873, 1860-1969, 1992, 1970-1992, 2010, 1993-2068, 2106, 2069-2106, 2108, 2107-2109, 2109-3995, 4563, 4646, 4774, 4895, 4899, 4901, 4919, 213, 1840, 1846-1847, 2110-2112, 2121 ... Then I logged out and re-login the system, run 'crontab -e', the error still shows. Maybe I got bad luck today. :( Regards.
[toc] | [prev] | [next] | [standalone]
| From | Will Mengarini <seldon@eskimo.com> |
|---|---|
| Date | 2024-09-14 00:50 +0200 |
| Message-ID | <JmngZ-c4IA-5@gated-at.bofh.it> |
| In reply to | #273065 |
You are getting Vim error messages from a version of Vim that does not support scripting (probably vim.tiny). That version is probably installed on your system ALONG WITH a version that does support scripting, but cron does not have the scripting version of Vim on PATH. (Typically, your $HOME & root PATHs are more elaborate than the one to which cron defaults.) The solution is to set PATH in your crontab. * Marcus Park <marp@privatembox.com> [24-09/14=Sat 06:12 +0800]: > > Andy Smith : >> As to why whatever it is set as right now is doing that, first work >> out where it is getting the setting from, so echo $EDITOR and echo >> $VISUAL. If neither of those are set then ls -la /usr/bin/editor. > > Thanks Andy. > > either $EDITOR or $VISUAL in my system is empty. > > And /usr/bin/editor points to nano. > > Then I run this command, > > $ sudo update-alternatives --config editor > There are 4 choices for the alternative editor (providing /usr/bin/editor). > > Selection Path Priority Status > ------------------------------------------------------------ > * 0 /bin/nano 40 auto mode > 1 /bin/ed -100 manual mode > 2 /bin/nano 40 manual mode > 3 /usr/bin/vim.basic 30 manual mode > 4 /usr/bin/vim.tiny 15 manual mode > > Press <enter> to keep the current choice[*], or type selection number: 3 > update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor > (editor) in manual mode > > > > to choose vim.basic as default editor. > > In my system both vim.basic and vim are the same stuff, > > $ vim --version > VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Aug 27 2024 05:34:22) > Included patches: 1-16, 647, 17-579, 1969, 580-647, 678, 648-1848, 4975, > 5016, 5023, 5072, 2068, 1849-1854, 1857, 1855-1857, 1331, 1858, 1858-1859, > 1873, 1860-1969, 1992, 1970-1992, 2010, 1993-2068, 2106, 2069-2106, 2108, > 2107-2109, 2109-3995, 4563, 4646, 4774, 4895, 4899, 4901, 4919, 213, 1840, > 1846-1847, 2110-2112, 2121 > ... > > > $ vim.basic --version > VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Aug 27 2024 05:34:22) > Included patches: 1-16, 647, 17-579, 1969, 580-647, 678, 648-1848, 4975, > 5016, 5023, 5072, 2068, 1849-1854, 1857, 1855-1857, 1331, 1858, 1858-1859, > 1873, 1860-1969, 1992, 1970-1992, 2010, 1993-2068, 2106, 2069-2106, 2108, > 2107-2109, 2109-3995, 4563, 4646, 4774, 4895, 4899, 4901, 4919, 213, 1840, > 1846-1847, 2110-2112, 2121 > ... > > > Then I logged out and re-login the system, run 'crontab -e', the error still > shows. Maybe I got bad luck today. :( > > Regards.
[toc] | [prev] | [next] | [standalone]
| From | Will Mengarini <seldon@eskimo.com> |
|---|---|
| Date | 2024-09-14 01:00 +0200 |
| Message-ID | <JmnqF-c4LD-1@gated-at.bofh.it> |
| In reply to | #273067 |
Or ... disambiguate which Vim crontab -e is using, so it's not vim.tiny. * Will Mengarini <seldon@eskimo.com> [24-09/13=Fri 15:47 -0700]: > You are getting Vim error messages from a version of Vim that does > not support scripting (probably vim.tiny). That version is probably > installed on your system ALONG WITH a version that does support > scripting, but cron does not have the scripting version of Vim on PATH. > (Typically, your $HOME & root PATHs are more elaborate than the one to > which cron defaults.) The solution is to set PATH in your crontab. > > * Marcus Park <marp@privatembox.com> [24-09/14=Sat 06:12 +0800]: > > > > Andy Smith : > >> As to why whatever it is set as right now is doing that, first work > >> out where it is getting the setting from, so echo $EDITOR and echo > >> $VISUAL. If neither of those are set then ls -la /usr/bin/editor. > > > > Thanks Andy. > > > > either $EDITOR or $VISUAL in my system is empty. > > > > And /usr/bin/editor points to nano. > > > > Then I run this command, > > > > $ sudo update-alternatives --config editor > > There are 4 choices for the alternative editor (providing /usr/bin/editor). > > > > Selection Path Priority Status > > ------------------------------------------------------------ > > * 0 /bin/nano 40 auto mode > > 1 /bin/ed -100 manual mode > > 2 /bin/nano 40 manual mode > > 3 /usr/bin/vim.basic 30 manual mode > > 4 /usr/bin/vim.tiny 15 manual mode > > > > Press <enter> to keep the current choice[*], or type selection number: 3 > > update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor > > (editor) in manual mode > > > > > > > > to choose vim.basic as default editor. > > > > In my system both vim.basic and vim are the same stuff, > > > > $ vim --version > > VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Aug 27 2024 05:34:22) > > Included patches: 1-16, 647, 17-579, 1969, 580-647, 678, 648-1848, 4975, > > 5016, 5023, 5072, 2068, 1849-1854, 1857, 1855-1857, 1331, 1858, 1858-1859, > > 1873, 1860-1969, 1992, 1970-1992, 2010, 1993-2068, 2106, 2069-2106, 2108, > > 2107-2109, 2109-3995, 4563, 4646, 4774, 4895, 4899, 4901, 4919, 213, 1840, > > 1846-1847, 2110-2112, 2121 > > ... > > > > > > $ vim.basic --version > > VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Aug 27 2024 05:34:22) > > Included patches: 1-16, 647, 17-579, 1969, 580-647, 678, 648-1848, 4975, > > 5016, 5023, 5072, 2068, 1849-1854, 1857, 1855-1857, 1331, 1858, 1858-1859, > > 1873, 1860-1969, 1992, 1970-1992, 2010, 1993-2068, 2106, 2069-2106, 2108, > > 2107-2109, 2109-3995, 4563, 4646, 4774, 4895, 4899, 4901, 4919, 213, 1840, > > 1846-1847, 2110-2112, 2121 > > ... > > > > > > Then I logged out and re-login the system, run 'crontab -e', the error still > > shows. Maybe I got bad luck today. :( > > > > Regards.
[toc] | [prev] | [next] | [standalone]
| From | Andy Smith <andy@strugglers.net> |
|---|---|
| Date | 2024-09-14 00:50 +0200 |
| Message-ID | <JmngZ-c4IA-7@gated-at.bofh.it> |
| In reply to | #273065 |
Hi, On Sat, Sep 14, 2024 at 06:12:02AM +0800, Marcus Park wrote: > either $EDITOR or $VISUAL in my system is empty. > > And /usr/bin/editor points to nano. Well, I do not really understand what is going on then as you are definitely running an editor that looks at vim config files, and nano won't do that. I assume you are looking at the environment of the same user that is executing "crontab -e"? When the editor from "crontab -e" is running, you could go into another terminal and look at all your processes to see which actual binary is being called. IIRC, vim when invoked as vi, acts in vi compat mode and that may be why it can't parse its own system config. Although still it is a mystery to me why you do not get nano. I just ran crontab -e as a fresh user and it actually invoked /usr/bin/sensible-editor and asked me which editor I wanted to use (now and in future). So perhaps the man page for crontab is out of date. It seems that sensible-editor records this choice in ~/.selected_editor. Is this what got called for you? If so, apparently running "select-editor" will change the choice. Thanks, Andy -- https://bitfolk.com/ -- No-nonsense VPS hosting
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Date | 2024-09-14 03:00 +0200 |
| Message-ID | <JmpiN-c5Sp-3@gated-at.bofh.it> |
| In reply to | #273068 |
On Fri, Sep 13, 2024 at 22:46:09 +0000, Andy Smith wrote: > I just ran crontab -e as a fresh user and it actually invoked > /usr/bin/sensible-editor and asked me which editor I wanted to use > (now and in future). So perhaps the man page for crontab is out of > date. Agreed. hobbit:~$ strings /usr/bin/crontab | grep usr/bin/ /usr/bin/sensible-editor The man page is simply wrong, I think.
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Date | 2024-09-14 00:00 +0200 |
| Message-ID | <JmmuB-c4du-23@gated-at.bofh.it> |
| In reply to | #273062 |
On Sat, Sep 14, 2024 at 05:44:42 +0800, Marcus Park wrote: > Hi list, > > When I run 'crontab -e' the screen shows some errors like, > > $ crontab -e > Error detected while processing /usr/share/vim/vim82/filetype.vim: > line 10: > E319: Sorry, the command is not available in this version: let > did_load_filetypes = 1 What version of Debian is this? What version of the vim package (or any similarly named package) are you running? Did you do anything *noteworthy* with this system, such as attempting an upgrade from one version of Debian to another, having it fail, and leaving it half done? For the record, Debian 12 has vim 9.0.x and a /usr/share/vim/vim90/ directory. According to <https://packages.debian.org/vim>... oh, that web page is not responding for me. Sorry, I can't check what version(s) of Debian might have had vim 8.2. Anyway, it sounds like you have vim 8.2 config files, but you're running an *older* version of vim which can't read those configs. Either that, or the /usr/share/vim/vim82/filetype.vim file is corrupted. If it's a corrupted file, you could purge and reinstall the vim package(s).
[toc] | [prev] | [next] | [standalone]
| From | Michael Kjörling <c9bc136c6063@ewoof.net> |
|---|---|
| Date | 2024-09-14 10:50 +0200 |
| Message-ID | <JmwDD-car4-9@gated-at.bofh.it> |
| In reply to | #273064 |
On 13 Sep 2024 17:53 -0400, from greg@wooledge.org (Greg Wooledge): > For the record, Debian 12 has vim 9.0.x and a /usr/share/vim/vim90/ > directory. According to <https://packages.debian.org/vim>... oh, > that web page is not responding for me. Sorry, I can't check what > version(s) of Debian might have had vim 8.2. Bullseye / 11 had vim 8.2. (Specifically, the current package version is 2:8.2.2434-3+deb11u1 <https://packages.debian.org/bullseye/vim>.) Buster had 8.1, Bookworm is at 9.0 as you say, and Trixie and Sid are both currently on the 9.1 branch. -- Michael Kjörling 🔗 https://michael.kjorling.se “Remember when, on the Internet, nobody cared that you were a dog?”
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web