Я чувствую, что перепробовал все, но мне не хватает чего-то очень простого ... Я пытаюсь запустить make-файл из проекта (который отлично работает на Mac) на машине Windows с запущенным WSL, но получаю странная ошибка.
Я заметил, что версия make в WSL - 0.8.1
, которая казалась старой, поэтому я попытался перейти на 3.81
с помощью следующих шагов:
wget http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tarxvf make-3.81.tar.gz
cd make-3.81/
./configure
make
Но я получаю этот вывод каждый раз время. Когда я запускаю команду make для проекта, я получаю тот же вывод, что и для сценария установки.
davidn0rman@WSL-Ubuntu:/tmp/make-3.81$ make
make ℹ info Invoking all target
make ℹ info Invoking config.h target
make ℹ info Invoking stamp-h1 target
(node:13860) UnhandledPromiseRejectionWarning: undefined
(node:13860) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:13860) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not
handled will terminate the Node.js process with a non-zero exit code.
make ✖ ERR not found: make-$(srcdir)/config.h.in
$ make <target...> [options]
Options:
--help Show this help output
--version Show package version
--debug Enable extended log output
Targets:
[targets in the Makefile list here]
Если я попытаюсь make -v
, я получу следующее, но на Mac я получу версию и сообщение об авторском праве.
davidn0rman@WSL-Ubuntu:/tmp$ make -v
make ✖ ERR Missing Makefile / Bakefile
make ℹ info Run "make init" to generate a Makefile.
Сказать, что это расстраивает, мягко говоря, интересно, сталкивался ли кто-нибудь с этим раньше в WSL или Ubuntu? Node и npm обновлены.
Как упомянуто в этом комментарии @steeldriver , у меня, по-видимому, была npm make вдоль стороны make.
type -a make
. В идеале вы хотите, чтобы появился /usr/bin/make
, у меня также было /usr/local/bin/make
, которое не нужно. npm uninstall make -g
, чтобы удалить последний экземпляр make. Это исправило проблему.