安装 getnonfreefonts 后,尝试时sudo getnonfreefonts --sys luximono
出现以下错误之一:
curl: (55) getpeername() failed with errno 22: Invalid argument
curl: (7) Failed to connect to mirrors.ctan.org port 80: Operation timed out
使用sudo getnonfreefonts --sys vntex-nonfree
安装 VnTex 没有任何问题,但所有其他字体不起作用。
运行该命令会--debug
得到以下结果:
DEBUG: getnonfreefonts rev. 2017-06-02.
DEBUG: argv[0]: '/usr/local/bin/getnonfreefonts'
DEBUG: argv[1]: '--sys'
DEBUG: argv[2]: '--debug'
DEBUG: argv[3]: 'luximono'
DEBUG: opt_sys=1
DEBUG: opt_user=0
DEBUG: PATH[0]: '/opt/local/bin'.
DEBUG: PATH[1]: '/opt/local/sbin'.
DEBUG: PATH[2]: '/opt/local/bin'.
DEBUG: PATH[3]: '/opt/local/sbin'.
DEBUG: PATH[4]: '/usr/local/bin'.
DEBUG: PATH[5]: '/usr/bin'.
DEBUG: PATH[6]: '/bin'.
DEBUG: PATH[7]: '/usr/sbin'.
DEBUG: PATH[8]: '/sbin'.
DEBUG: PATH[9]: '/Library/TeX/texbin'.
DEBUG: PATH[10]: '/opt/X11/bin'.
DEBUG: Search for kpsewhich in PATH:
DEBUG: Found '/Library/TeX/texbin/kpsewhich'.
DEBUG: TEXMFLOCAL[0]: '/usr/local/texlive/texmf-local'.
DEBUG: Extracting the first element of the list (TEXMFLOCAL[0]):
DEBUG: TEXMFLOCAL[0]='/usr/local/texlive/texmf-local'.
DEBUG: Removing leading "!!" and trailing "//" and set INSTALLROOT:
DEBUG: INSTALLROOT='/usr/local/texlive/texmf-local'.
DEBUG: Environment variable TMPDIR not set.
DEBUG: Environment variable TEMP not set.
DEBUG: Internal variable SYSTMP set to '/tmp'.
DEBUG: Internal variable tmpdir set to '/tmp/getfont-10295'.
DEBUG: Signal handlers installed. Don't expect too much on Windows.
DEBUG: No wget binary found on your system, trying curl.
DEBUG: Running 'curl -O https://www.tug.org/~kotucha/getnonfreefonts/getfont.pl'.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 32681 100 32681 0 0 32681 0 0:00:01 --:--:-- 0:00:01 104k
DEBUG: Running 'perl ./getfont.pl --installroot=/usr/local/texlive/texmf-local --debug --sys --use_curl luximono'.
------------------------------------------------------
Installation directory: /usr/local/texlive/texmf-local
------------------------------------------------------
===================
Package 'luximono':
===================
Downloading 'http://mirrors.ctan.org/fonts/LuxiMono.zip'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
curl: (55) getpeername() failed with errno 22: Invalid argument
[download failed]
Download failed. Please try again.
DEBUG: Info: Execute updmap-sys if exit status is 2.
DEBUG: Exit status of getfont.pl is 0.
DEBUG: Executing Signal Handler:
DEBUG: unlink '/tmp/getfont-10295/getfont.pl'.
DEBUG: rmdir '/tmp/getfont-10295'.
或者这样(交替):
DEBUG: getnonfreefonts rev. 2017-06-02.
DEBUG: argv[0]: '/usr/local/bin/getnonfreefonts'
DEBUG: argv[1]: '--sys'
DEBUG: argv[2]: '--debug'
DEBUG: argv[3]: 'luximono'
DEBUG: opt_sys=1
DEBUG: opt_user=0
DEBUG: PATH[0]: '/opt/local/bin'.
DEBUG: PATH[1]: '/opt/local/sbin'.
DEBUG: PATH[2]: '/opt/local/bin'.
DEBUG: PATH[3]: '/opt/local/sbin'.
DEBUG: PATH[4]: '/usr/local/bin'.
DEBUG: PATH[5]: '/usr/bin'.
DEBUG: PATH[6]: '/bin'.
DEBUG: PATH[7]: '/usr/sbin'.
DEBUG: PATH[8]: '/sbin'.
DEBUG: PATH[9]: '/Library/TeX/texbin'.
DEBUG: PATH[10]: '/opt/X11/bin'.
DEBUG: Search for kpsewhich in PATH:
DEBUG: Found '/Library/TeX/texbin/kpsewhich'.
DEBUG: TEXMFLOCAL[0]: '/usr/local/texlive/texmf-local'.
DEBUG: Extracting the first element of the list (TEXMFLOCAL[0]):
DEBUG: TEXMFLOCAL[0]='/usr/local/texlive/texmf-local'.
DEBUG: Removing leading "!!" and trailing "//" and set INSTALLROOT:
DEBUG: INSTALLROOT='/usr/local/texlive/texmf-local'.
DEBUG: Environment variable TMPDIR not set.
DEBUG: Environment variable TEMP not set.
DEBUG: Internal variable SYSTMP set to '/tmp'.
DEBUG: Internal variable tmpdir set to '/tmp/getfont-10337'.
DEBUG: Signal handlers installed. Don't expect too much on Windows.
DEBUG: No wget binary found on your system, trying curl.
DEBUG: Running 'curl -O https://www.tug.org/~kotucha/getnonfreefonts/getfont.pl'.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 32681 100 32681 0 0 32681 0 0:00:01 --:--:-- 0:00:01 125k
DEBUG: Running 'perl ./getfont.pl --installroot=/usr/local/texlive/texmf-local --debug --sys --use_curl luximono'.
------------------------------------------------------
Installation directory: /usr/local/texlive/texmf-local
------------------------------------------------------
===================
Package 'luximono':
===================
Downloading 'http://mirrors.ctan.org/fonts/LuxiMono.zip'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:01:14 --:--:-- 0curl: (7) Failed to connect to mirrors.ctan.org port 80: Operation timed out
[download failed]
Download failed. Please try again.
DEBUG: Info: Execute updmap-sys if exit status is 2.
DEBUG: Exit status of getfont.pl is 0.
DEBUG: Executing Signal Handler:
DEBUG: unlink '/tmp/getfont-10337/getfont.pl'.
DEBUG: rmdir '/tmp/getfont-10337'.
怎么了?
答案1
所以问题确实是 ctan.org 的服务器宕机了。我今天早上重试并成功安装了字体。这些错误可能对我这个不太了解 curl 的人来说太难懂了,但如果你收到以下错误,则意味着服务器很可能宕机了。
curl: (7) Failed to connect to mirrors.ctan.org port 80: Operation timed out
curl: (55) getpeername() failed with errno 22: Invalid argument