我一直在尝试在Docker容器上安装domjudge,但是当我执行时

 sudo make install-domserver

我不断收到此错误:
/usr/bin/install -c -m 0644 -o     -m 0700 -d /home/domjudge/domjudge/domserver/log
/usr/bin/install: invalid user '-m'
Makefile:98: recipe for target 'install-domserver-l' failed

您可能会在这里看到完整的日志:
docker run -it -p 8080:80 a596a9e71faf
domjudge@f31ab58ea764:~/domjudge-5.0.1$ ./configure --prefix=$HOME/domjudge
checking whether configure should try to set CFLAGS... yes
checking whether configure should try to set CXXFLAGS... yes
checking whether configure should try to set LDFLAGS... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether C compiler accepts -Wall... yes
checking whether C compiler accepts -fstack-protector... yes
checking whether C compiler accepts -fPIE... yes
checking whether C compiler accepts -D_FORTIFY_SOURCE=2... yes
checking whether the linker accepts -fPIE... yes
checking whether the linker accepts -pie... yes
checking whether the linker accepts -Wl,-z,relro... yes
checking whether the linker accepts -Wl,-z,now... yes
checking domjudge-user...  (default: current user)
checking webserver-group... www-data (detected)
checking runuser... domjudge-run (default)
checking for cgroup_init in -lcgroup... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking how to run the C++ preprocessor... g++ -E
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strrchr... yes
checking for strstr... yes
checking for strtol... yes
configure: creating ./config.status
config.status: creating paths.mk
config.status: creating etc/config.h

Summary:
 * project.............: DOMjudge 5.0.1
 * prefix..............: /home/domjudge/domjudge
 * CPPFLAGS............:
 * CFLAGS..............: -g -O2 -Wall -fstack-protector -fPIE -D_FORTIFY_SOURCE=2
 * CXXFLAGS............: -g -O2 -Wall -fstack-protector -fPIE -D_FORTIFY_SOURCE=2
 * LDFLAGS.............:  -fPIE -pie -Wl,-z,relro -Wl,-z,now

 * default user........:
 * runguard user.......: domjudge-run
 * webserver group.....: www-data

 * use Linux cgroups...: no

 * submitclient........: enabled, cURL version: 7.38.0

 * documentation.......: /home/domjudge/domjudge/doc

 * domserver...........: /home/domjudge/domjudge/domserver
    - bin..............: /home/domjudge/domjudge/domserver/bin
    - etc..............: /home/domjudge/domjudge/domserver/etc
    - lib..............: /home/domjudge/domjudge/domserver/lib
    - libext...........: /home/domjudge/domjudge/domserver/lib/ext
    - libwww...........: /home/domjudge/domjudge/domserver/lib/www
    - libsubmit........: /home/domjudge/domjudge/domserver/lib/submit
    - log..............: /home/domjudge/domjudge/domserver/log
    - run..............: /home/domjudge/domjudge/domserver/run
    - sql..............: /home/domjudge/domjudge/domserver/sql
    - submit...........: /home/domjudge/domjudge/domserver/submissions
    - tmp..............: /home/domjudge/domjudge/domserver/tmp
    - www..............: /home/domjudge/domjudge/domserver/www

 * judgehost...........: /home/domjudge/domjudge/judgehost
    - bin..............: /home/domjudge/domjudge/judgehost/bin
    - etc..............: /home/domjudge/domjudge/judgehost/etc
    - lib..............: /home/domjudge/domjudge/judgehost/lib
    - libext...........: /home/domjudge/domjudge/judgehost/lib/ext
    - libjudge.........: /home/domjudge/domjudge/judgehost/lib/judge
    - log..............: /home/domjudge/domjudge/judgehost/log
    - run..............: /home/domjudge/domjudge/judgehost/run
    - tmp..............: /home/domjudge/domjudge/judgehost/tmp
    - judge............: /home/domjudge/domjudge/judgehost/judgings
    - chroot...........: /chroot/domjudge
    - cgroup...........: /cgroup

Run 'make' without arguments to get a list of (build) targets.

domjudge@f31ab58ea764:~/domjudge-5.0.1$ make domserver
make -C etc config
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/etc'
Substituting configure variables in 'apache.conf'.
Substituting configure variables in 'nginx-conf'.
Substituting configure variables in 'domserver-static.php'.
Substituting configure variables in 'judgehost-static.php'.
Substituting configure variables in 'runguard-config.h'.
Substituting configure variables in 'submit-config.h'.
Substituting configure variables in 'sudoers-domjudge'.
Substituting configure variables in 'cgroup-domjudge.conf'.
Substituting configure variables in 'domjudge-judgehost.init'.
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/etc'
Recursing target `domserver' into: etc sql www misc-tools
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/etc'
echo "# Randomly generated on host `hostname`, `date`" > dbpasswords.secret
chmod go= dbpasswords.secret
./gendbpasswords >> dbpasswords.secret
echo "# Randomly generated on host `hostname`, `date`" > restapi.secret
chmod go= restapi.secret
./genrestapicredentials >> restapi.secret
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/etc'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/sql'
Substituting configure variables in 'dj-setup-database'.
chmod a+x dj-setup-database
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/sql'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/www'
Substituting configure variables in 'configure.php'.
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/www'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/misc-tools'
Substituting configure variables in 'balloons'.
chmod a+x balloons
Substituting configure variables in 'create_accounts'.
chmod a+x create_accounts
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/misc-tools'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1'
make[1]: Nothing to be done for 'domserver-l'.
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1'
domjudge@f31ab58ea764:~/domjudge-5.0.1$ sudo make install-domserver
make -C etc config
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/etc'
make[1]: Nothing to be done for 'config'.
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/etc'
Recursing target `domserver' into: etc sql www misc-tools
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/etc'
make[1]: Nothing to be done for 'domserver'.
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/etc'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/sql'
make[1]: Nothing to be done for 'domserver'.
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/sql'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/www'
make[1]: Nothing to be done for 'domserver'.
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/www'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/misc-tools'
make[1]: Nothing to be done for 'domserver'.
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/misc-tools'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1'
make[1]: Nothing to be done for 'domserver-l'.
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1'
/usr/bin/install -c -d /home/domjudge/domjudge/domserver/bin /home/domjudge/domjudge/domserver/etc /home/domjudge/domjudge/domserver/www /home/domjudge/domjudge/domserver/lib /home/domjudge/domjudge/domserver/lib/submit /home/domjudge/domjudge/domserver/lib/ext /home/domjudge/domjudge/domserver/lib/www /home/domjudge/domjudge/domserver/log /home/domjudge/domjudge/domserver/run /home/domjudge/domjudge/domserver/tmp /home/domjudge/domjudge/domserver/submissions /home/domjudge/domjudge/domserver/sql/upgrade /home/domjudge/domjudge/domserver/www/images/affiliations /home/domjudge/domjudge/domserver/www/images/countries /home/domjudge/domjudge/domserver/www/images/teams /home/domjudge/domjudge/domserver/www/public /home/domjudge/domjudge/domserver/www/team /home/domjudge/domjudge/domserver/www/jury /home/domjudge/domjudge/domserver/www/api /home/domjudge/domjudge/domserver/www/auth /home/domjudge/domjudge/domserver/www/js /home/domjudge/domjudge/domserver/www/js/flot /home/domjudge/domjudge/domserver/www/js/ace
Recursing target `install-domserver' into: etc lib sql www misc-tools
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/etc'
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/etc \
    apache.conf nginx-conf domserver-static.php
/usr/bin/install -c -t /home/domjudge/domjudge/domserver/etc \
    gendbpasswords genrestapicredentials
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/etc \
    domserver-config.php common-config.php
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/etc'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/lib'
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/lib    *.php
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/lib/www www/*.php
/usr/bin/install -c -t /home/domjudge/domjudge/domserver/lib    alert
cp -R           -t /home/domjudge/domjudge/domserver/lib/ext ext/*
chmod -R a+rX      /home/domjudge/domjudge/domserver/lib/ext
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/lib'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/sql'
/usr/bin/install -c -t /home/domjudge/domjudge/domserver/bin dj-setup-database
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/sql \
    mysql_db_structure.sql mysql_db_defaultdata.sql mysql_db_examples.sql \
    mysql_db_files_defaultdata.sql mysql_db_files_examples.sql
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/sql/upgrade \
    upgrade/upgrade_*.sql upgrade/README
/usr/bin/install -c -d /home/domjudge/domjudge/domserver/sql/files/defaultdata /home/domjudge/domjudge/domserver/sql/files/examples
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/sql/files/defaultdata \
    files/defaultdata/*.zip
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/sql/files/examples \
    files/examples/*.zip
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/sql'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/www'
for d in . countries ; do \
    /usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/www/images/$d images/$d/*.png ; \
done
for d in public team jury api auth ; do \
    /usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/www/$d $d/*.php ; \
done
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/www/images/teams images/teams/*.jpg
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/www/jury         jury/*.css
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/www/js           js/*.js js/*.gif js/*.png
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/www/js/flot      js/flot/*.js
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/www/js/ace       js/ace/*.js
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/www              *.php *.css
rm -f /home/domjudge/domjudge/domserver/www/jury/doc
ln -s /home/domjudge/domjudge/doc /home/domjudge/domjudge/domserver/www/jury/doc
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/www'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/misc-tools'
/usr/bin/install -c -t /home/domjudge/domjudge/domserver/bin balloons create_accounts
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/misc-tools'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1'
make check-root
make[2]: Entering directory '/home/domjudge/domjudge-5.0.1'
make[2]: Leaving directory '/home/domjudge/domjudge-5.0.1'
/usr/bin/install -c -m 0644 -o     -m 0700 -d /home/domjudge/domjudge/domserver/log
/usr/bin/install: invalid user '-m'
Makefile:98: recipe for target 'install-domserver-l' failed
make[1]: [install-domserver-l] Error 1 (ignored)
/usr/bin/install -c -m 0644 -o     -m 0700 -d /home/domjudge/domjudge/domserver/run
/usr/bin/install: invalid user '-m'
Makefile:98: recipe for target 'install-domserver-l' failed
make[1]: [install-domserver-l] Error 1 (ignored)
/usr/bin/install -c -m 0644 -o  -g www-data -m 0770 -d /home/domjudge/domjudge/domserver/submissions
/usr/bin/install: invalid user '-g'
Makefile:98: recipe for target 'install-domserver-l' failed
make[1]: [install-domserver-l] Error 1 (ignored)
/usr/bin/install -c -m 0644 -o  -g www-data -m 0770 -d /home/domjudge/domjudge/domserver/tmp
/usr/bin/install: invalid user '-g'
Makefile:98: recipe for target 'install-domserver-l' failed
make[1]: [install-domserver-l] Error 1 (ignored)
/usr/bin/install -c -m 0644 -o  -m 0600 -t /home/domjudge/domjudge/domserver/etc \
    etc/restapi.secret
/usr/bin/install: invalid user '-m'
Makefile:98: recipe for target 'install-domserver-l' failed
make[1]: [install-domserver-l] Error 1 (ignored)
/usr/bin/install -c -m 0644 -o  -g www-data -m 0640 -t /home/domjudge/domjudge/domserver/etc \
    etc/dbpasswords.secret
/usr/bin/install: invalid user '-g'
Makefile:98: recipe for target 'install-domserver-l' failed
make[1]: [install-domserver-l] Error 1 (ignored)
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1'
domjudge@f31ab58ea764:~/domjudge-5.0.1$

最佳答案

我在--with-domjudge-user中缺少使用./configure --prefix=$HOME/domjudge --with-domjudge-user=domjudge arg。

再次感谢Etan Reisner的反馈。

08-28 09:33