Error when installing Bench

Hello,

I have been following the documentation for installing frappe-bench
from this link Installation

when executing this command

bench init frappe-bench

I get this error

Traceback (most recent call last):
  File "/home/sang/bench-repo/bench/commands/make.py", line 70, in init
    init(
  File "/home/sang/bench-repo/bench/utils/render.py", line 95, in wrapper_fn
    return fn(*args, **kwargs)
  File "/home/sang/bench-repo/bench/utils/system.py", line 107, in init
    bench.setup.backups()
  File "/home/sang/bench-repo/bench/utils/render.py", line 110, in wrapper_fn
    return fn(*args, **kwargs)
  File "/home/sang/bench-repo/bench/bench.py", line 410, in backups
    system_crontab = CronTab(user=user)
  File "/usr/local/lib/python3.8/dist-packages/crontab.py", line 227, in __init__
    self.read(tabfile)
  File "/usr/local/lib/python3.8/dist-packages/crontab.py", line 284, in read
    (out, err) = open_pipe(CRONCMD, l='', **self.user_opt).communicate()
  File "/usr/local/lib/python3.8/dist-packages/crontab.py", line 189, in open_pipe
    return sp.Popen(args, stdout=sp.PIPE, stderr=sp.PIPE, env=env)
  File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/crontab'

ERROR: There was a problem while creating frappe-bench
Do you want to rollback these changes? [y/N]: 


any help regarding this issue?

Hi ,

May we know the operating environment that Bench is being installed in? It looks like the cron package may not be installed.

I am on Ubuntu 20.x
Python 3.9

I noticed that after I posted the issue here and fixed that but now I am getting a different error:

make: Leaving directory '/home/frappe/frappe-bench/apps/frappe/node_modules/node-sass/build'
Build failed with error code: 1


Traceback (most recent call last):
  File "/home/frappe/.local/lib/python3.9/site-packages/bench/commands/make.py", line 70, in init
    init(
  File "/home/frappe/.local/lib/python3.9/site-packages/bench/utils/render.py", line 95, in wrapper_fn
    return fn(*args, **kwargs)
  File "/home/frappe/.local/lib/python3.9/site-packages/bench/utils/system.py", line 78, in init
    get_app(
  File "/home/frappe/.local/lib/python3.9/site-packages/bench/app.py", line 371, in get_app
    app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
  File "/home/frappe/.local/lib/python3.9/site-packages/bench/utils/render.py", line 110, in wrapper_fn
    return fn(*args, **kwargs)
  File "/home/frappe/.local/lib/python3.9/site-packages/bench/app.py", line 198, in install
    install_app(
  File "/home/frappe/.local/lib/python3.9/site-packages/bench/app.py", line 428, in install_app
    bench.run("yarn install", cwd=app_path)
  File "/home/frappe/.local/lib/python3.9/site-packages/bench/bench.py", line 43, in run
    return exec_cmd(cmd, cwd=cwd or self.cwd)
  File "/home/frappe/.local/lib/python3.9/site-packages/bench/utils/__init__.py", line 126, in exec_cmd
    raise CommandFailedError
bench.exceptions.CommandFailedError

thanks for the reply

Try bench setup --requirements and bench build

Thanks a lot for your help.
since there are some other breaking bugs for version 13 here in the forums and in github I decided to stay with version 12.