Error: failed to acquire build lock

Hi guys, running the command ‘hugo server --noBuildLock’ seem to be okay. But the creation of new content using the command 'hugo new <sample.md> is having error with this Error: failed to acquire a build loc. Any idea how to resolve this?

Can you please describe your setup?

Im running my setup in my phone using termux, and this hugo version - ‘hugo v0.123.7+extended android/arm64 BuildDate=unknown ver’.

I looked at the code:

  • The --noBuildLock flag is not available to use with hugo new
  • Even if it were, the locking logic for creating new content is not conditional upon that flag

The only workaround is to manually create the content (e.g., touch sample.md) then add front matter.

You’re welcome to create a proposal, but even if accepted I suspect its priority will be exceedingly low.

我尝试了一下,应该是文件权限问题。在Termux 的文件目录内运行(至少在proot-distro里面)没有问题。

you can run it in termux src (not in the sdcard src)

Makefile

all: run

run:
        hugo --gc --minify && zip -r hugo ./public && cp hugo.zip ../hugo
# add a link:  the src in sdcard ⇒ ./hugo