我一直在使用 MikTex 和 TexMaker 作为编译器/编辑器。
有一次,我尝试删除 MikTex 并切换到 TexLive,但由于安装已损坏,它无法正常工作。我查看了这个网站上的几个问题,并用它们去除了 TexLive 的任何残留物(参见https://tex.stackexchange.com/questions/95483/how-to-remove-everything-related-to-tex-live- for-fresh-install-on-ubuntu/95502#95502 ); 我清除了 texmf 和 ~/.texlive。
然后我重新安装了 MikTex。现在,当我尝试重新安装 TexMaker 时,我发现它也需要 TexLive 包,并且它会产生与尝试安装 TexLive 时相同的错误。特别是,似乎存在与处理 texlive 包相关的一系列错误,以及与 kpsewhich 相关的东西;还有很多与依赖项相关的东西需要安装但无法配置。我附上sudo apt-get install texmaker
.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
asymptote asymptote-doc fonts-lmodern fonts-texgyre freeglut3 libfile-homedir-perl libfile-which-perl libmime-charset-perl libosmesa6 libqt5printsupport5 libsombok3 libunicode-linebreak-perl libyaml-tiny-perl lmodern
preview-latex-style ps2eps tex-gyre texlive-base texlive-extra-utils texlive-font-utils texlive-fonts-recommended texlive-lang-english texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-pictures
texlive-plain-generic texlive-pstricks texmaker-data tipa
Suggested packages:
libencode-hanextra-perl libpod2-base-perl perl-tk chktex dvidvi dvipng fragmaster lacheck latexdiff latexmk purifyeps xindy texlive-fonts-recommended-doc texlive-latex-base-doc python-pygments icc-profiles
libspreadsheet-parseexcel-perl texlive-latex-extra-doc texlive-latex-recommended-doc dot2tex prerex ruby-tcltk | libtcltk-ruby texlive-pictures-doc vprerex texlive-pstricks-doc texlive-lang-all
Recommended packages:
latex-beamer
The following NEW packages will be installed:
asymptote asymptote-doc fonts-lmodern fonts-texgyre freeglut3 libfile-homedir-perl libfile-which-perl libmime-charset-perl libosmesa6 libqt5printsupport5 libsombok3 libunicode-linebreak-perl libyaml-tiny-perl lmodern
preview-latex-style ps2eps tex-gyre texlive-base texlive-extra-utils texlive-font-utils texlive-fonts-recommended texlive-lang-english texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-pictures
texlive-plain-generic texlive-pstricks texmaker texmaker-data tipa
0 upgraded, 31 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/254 MB of archives.
After this operation, 545 MB of additional disk space will be used.
Extracting templates from packages: 100%
Preconfiguring packages ...
Selecting previously unselected package freeglut3:amd64.
(Reading database ... 264719 files and directories currently installed.)
Preparing to unpack .../00-freeglut3_2.8.1-3_amd64.deb ...
Unpacking freeglut3:amd64 (2.8.1-3) ...
Selecting previously unselected package libosmesa6:amd64.
Preparing to unpack .../01-libosmesa6_19.0.8-0ubuntu0~18.04.2_amd64.deb ...
Unpacking libosmesa6:amd64 (19.0.8-0ubuntu0~18.04.2) ...
Selecting previously unselected package fonts-lmodern.
Preparing to unpack .../02-fonts-lmodern_2.004.5-3_all.deb ...
Unpacking fonts-lmodern (2.004.5-3) ...
Selecting previously unselected package texlive-base.
Preparing to unpack .../03-texlive-base_2017.20180305-1_all.deb ...
Unpacking texlive-base (2017.20180305-1) ...
Selecting previously unselected package texlive-latex-base.
Preparing to unpack .../04-texlive-latex-base_2017.20180305-1_all.deb ...
Unpacking texlive-latex-base (2017.20180305-1) ...
Selecting previously unselected package texlive-latex-recommended.
Preparing to unpack .../05-texlive-latex-recommended_2017.20180305-1_all.deb ...
Unpacking texlive-latex-recommended (2017.20180305-1) ...
Selecting previously unselected package texlive-pictures.
Preparing to unpack .../06-texlive-pictures_2017.20180305-1_all.deb ...
Unpacking texlive-pictures (2017.20180305-1) ...
Selecting previously unselected package texlive-plain-generic.
Preparing to unpack .../07-texlive-plain-generic_2017.20180305-2_all.deb ...
Unpacking texlive-plain-generic (2017.20180305-2) ...
Selecting previously unselected package texlive-pstricks.
Preparing to unpack .../08-texlive-pstricks_2017.20180305-2_all.deb ...
Unpacking texlive-pstricks (2017.20180305-2) ...
Selecting previously unselected package asymptote.
Preparing to unpack .../09-asymptote_2.41-4_amd64.deb ...
Unpacking asymptote (2.41-4) ...
Selecting previously unselected package asymptote-doc.
Preparing to unpack .../10-asymptote-doc_2.41-4_all.deb ...
Unpacking asymptote-doc (2.41-4) ...
Selecting previously unselected package fonts-texgyre.
Preparing to unpack .../11-fonts-texgyre_20160520-1_all.deb ...
Unpacking fonts-texgyre (20160520-1) ...
Selecting previously unselected package libfile-which-perl.
Preparing to unpack .../12-libfile-which-perl_1.21-1_all.deb ...
Unpacking libfile-which-perl (1.21-1) ...
Selecting previously unselected package libfile-homedir-perl.
Preparing to unpack .../13-libfile-homedir-perl_1.002-1_all.deb ...
Unpacking libfile-homedir-perl (1.002-1) ...
Selecting previously unselected package libmime-charset-perl.
Preparing to unpack .../14-libmime-charset-perl_1.012.2-1_all.deb ...
Unpacking libmime-charset-perl (1.012.2-1) ...
Selecting previously unselected package libqt5printsupport5:amd64.
Preparing to unpack .../15-libqt5printsupport5_5.9.5+dfsg-0ubuntu2.3_amd64.deb ...
Unpacking libqt5printsupport5:amd64 (5.9.5+dfsg-0ubuntu2.3) ...
Selecting previously unselected package libsombok3:amd64.
Preparing to unpack .../16-libsombok3_2.4.0-1_amd64.deb ...
Unpacking libsombok3:amd64 (2.4.0-1) ...
Selecting previously unselected package libunicode-linebreak-perl.
Preparing to unpack .../17-libunicode-linebreak-perl_0.0.20160702-1build2_amd64.deb ...
Unpacking libunicode-linebreak-perl (0.0.20160702-1build2) ...
Selecting previously unselected package libyaml-tiny-perl.
Preparing to unpack .../18-libyaml-tiny-perl_1.70-1_all.deb ...
Unpacking libyaml-tiny-perl (1.70-1) ...
Selecting previously unselected package lmodern.
Preparing to unpack .../19-lmodern_2.004.5-3_all.deb ...
Unpacking lmodern (2.004.5-3) ...
Selecting previously unselected package preview-latex-style.
Preparing to unpack .../20-preview-latex-style_11.91-1ubuntu1_all.deb ...
Unpacking preview-latex-style (11.91-1ubuntu1) ...
Selecting previously unselected package ps2eps.
Preparing to unpack .../21-ps2eps_1.68+binaryfree-2_amd64.deb ...
Unpacking ps2eps (1.68+binaryfree-2) ...
Selecting previously unselected package tex-gyre.
Preparing to unpack .../22-tex-gyre_20160520-1_all.deb ...
Unpacking tex-gyre (20160520-1) ...
Selecting previously unselected package texlive-extra-utils.
Preparing to unpack .../23-texlive-extra-utils_2017.20180305-2_all.deb ...
Unpacking texlive-extra-utils (2017.20180305-2) ...
Selecting previously unselected package texlive-font-utils.
Preparing to unpack .../24-texlive-font-utils_2017.20180305-2_all.deb ...
Unpacking texlive-font-utils (2017.20180305-2) ...
Selecting previously unselected package texlive-fonts-recommended.
Preparing to unpack .../25-texlive-fonts-recommended_2017.20180305-1_all.deb ...
Unpacking texlive-fonts-recommended (2017.20180305-1) ...
Selecting previously unselected package texlive-lang-english.
Preparing to unpack .../26-texlive-lang-english_2017.20180305-1_all.deb ...
Unpacking texlive-lang-english (2017.20180305-1) ...
Selecting previously unselected package texlive-latex-extra.
Preparing to unpack .../27-texlive-latex-extra_2017.20180305-2_all.deb ...
Unpacking texlive-latex-extra (2017.20180305-2) ...
Selecting previously unselected package texmaker-data.
Preparing to unpack .../28-texmaker-data_5.0.2-1build2_all.deb ...
Unpacking texmaker-data (5.0.2-1build2) ...
Selecting previously unselected package texmaker.
Preparing to unpack .../29-texmaker_5.0.2-1build2_amd64.deb ...
Unpacking texmaker (5.0.2-1build2) ...
Selecting previously unselected package tipa.
Preparing to unpack .../30-tipa_2%3a1.3-20_all.deb ...
Unpacking tipa (2:1.3-20) ...
Setting up freeglut3:amd64 (2.8.1-3) ...
Setting up libfile-which-perl (1.21-1) ...
Setting up libosmesa6:amd64 (19.0.8-0ubuntu0~18.04.2) ...
Setting up libfile-homedir-perl (1.002-1) ...
Setting up tex-gyre (20160520-1) ...
Setting up texmaker-data (5.0.2-1build2) ...
Setting up preview-latex-style (11.91-1ubuntu1) ...
Setting up fonts-texgyre (20160520-1) ...
Setting up libqt5printsupport5:amd64 (5.9.5+dfsg-0ubuntu2.3) ...
Setting up libyaml-tiny-perl (1.70-1) ...
Setting up libmime-charset-perl (1.012.2-1) ...
Setting up asymptote-doc (2.41-4) ...
Setting up texlive-base (2017.20180305-1) ...
mktexlsr: Updating /var/lib/texmf/ls-R-TEXLIVEDIST...
mktexlsr: Updating /usr/share/texmf/ls-R...
mktexlsr: Updating /var/lib/texmf/ls-R...
mktexlsr: Done.
kpsewhich: warning: running with administrator privileges
initexmf: warning: Option --admin should be specified when running this program with administrator privileges
initexmf: warning: Option --admin should be specified when running this program with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
tl-paper: setting paper size for dvips to a4: /var/cache/miktex-texmf/dvips/config/config-paper.ps
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
tl-paper: setting paper size for dvipdfmx to a4: /var/cache/miktex-texmf/dvipdfmx/dvipdfmx-paper.cfg
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
Can't use string ("2") as an ARRAY ref while "strict refs" in use at /usr/bin/tl-paper line 112.
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
tl-paper: setting paper size for pdftex to a4: /var/cache/miktex-texmf/tex/generic/config/pdftexconfig.tex
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
kpsewhich: warning: running with administrator privileges
Can't use string ("2") as an ARRAY ref while "strict refs" in use at /usr/bin/tl-paper line 112.
dpkg: error processing package texlive-base (--configure):
installed texlive-base package post-installation script subprocess returned error exit status 1
Setting up ps2eps (1.68+binaryfree-2) ...
dpkg: dependency problems prevent configuration of texlive-fonts-recommended:
texlive-fonts-recommended depends on texlive-base (>= 2017.20170628); however:
Package texlive-base is not configured yet.
dpkg: error processing package texlive-fonts-recommended (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of texlive-plain-generic:
texlive-plain-generic depends on texlive-base (>= 2017.20170628); however:
Package texlive-base is not configured yet.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: error processing package texlive-plain-generic (--configure):
dependency problems - leaving unconfigured
Setting up texmaker (5.0.2-1build2) ...
dpkg: dependency problems prevent configuration of texlive-latex-base:
texlive-latex-base depends on texlive-base (>= 2017.20170628); however:
Package texlive-base is not configured yet.
dpkg: error processing package texlive-latex-base (--configure):
dependency problems - leaving unconfigured
Setting up libsombok3:amd64 (2.4.0-1) ...
No apport report written because MaxReports is reached already
Setting up fonts-lmodern (2.004.5-3) ...
dpkg: dependency problems prevent configuration of asymptote:
asymptote depends on texlive-latex-base; however:
Package texlive-latex-base is not configured yet.
asymptote depends on texlive-plain-generic; however:
Package texlive-plain-generic is not configured yet.
dpkg: error processing package asymptote (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of texlive-pstricks:
texlive-pstricks depends on texlive-base (>= 2017.20170628); however:
Package texlive-base is not configured yet.
texlive-pstricks depends on texlive-plain-generic (>= 2017.20170628); however:
Package texlive-plain-generic is not configured yet.
dpkg: error processing package texlive-pstricks (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of texlive-latex-recommended:
texlive-latex-recommended depends on texlive-base (>= 2017.20170628); however:
Package texlive-base is not configured yet.
texlive-latex-recommended depends on texlive-latex-base (>= 2017.20170628); however:
Package texlive-latex-base is not configured yet.
dpkg: error processing package texlive-latex-recommended (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of texlive-extra-utils:
texlive-extra-utils depends on texlive-base (>= 2017.20170628); however:
Package texlive-base is not configured yet.
texlive-extra-utils depends on texlive-latex-base (>= 2017.20170628); however:
Package texlive-latex-base is not configured yet.
dpkg: error processing package texlive-extra-utils (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of texlive-latex-extra:
texlive-latex-extra depends on texlive-base (>= 2017.20170628); however:
Package texlive-base is not configured yet.
texlive-latex-extra depends on texlive-latex-recommended (>= 2017.20170628); however:
Package texlive-latex-recommended is not configured yet.
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
dpkg: error processing package texlive-latex-extra (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of texlive-pictures:
texlive-pictures depends on texlive-base (>= 2017.20170628); however:
Package texlive-base is not configured yet.
texlive-pictures depends on texlive-latex-recommended (>= 2017.20170628); however:
Package texlive-latex-recommended is not configured yet.
dpkg: error processing package texlive-pictures (--configure):
No apport report written because MaxReports is reached already
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of tipa:
tipa depends on texlive-latex-base; however:
Package texlive-latex-base is not configured yet.
dpkg: error processing package tipa (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of texlive-font-utils:
texlive-font-utils depends on texlive-base (>= 2017.20170628); however:
Package texlive-base is not configured yet.
dpkg: error processing package texlive-font-utils (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of texlive-lang-english:
texlive-lang-english depends on texlive-base (>= 2017.20170628); however:
Package texlive-base is not configured yet.
dpkg: error processing package texlive-lang-english (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Setting up libunicode-linebreak-perl (0.0.20160702-1build2) ...
Setting up lmodern (2.004.5-3) ...
Processing triggers for tex-common (6.09) ...
Running mktexlsr. This may take some time... done.
texlive-base is not ready, delaying updmap-sys call
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for install-info (6.5.0.dfsg.1-2) ...
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for fontconfig (2.12.6-0ubuntu2) ...
Errors were encountered while processing:
texlive-base
texlive-fonts-recommended
texlive-plain-generic
texlive-latex-base
asymptote
texlive-pstricks
texlive-latex-recommended
texlive-extra-utils
texlive-latex-extra
texlive-pictures
tipa
texlive-font-utils
texlive-lang-english
E: Sub-process /usr/bin/dpkg returned an error code (1)
下面是请求的输出。
which tl-paper
给出:
/usr/bin/tl-paper
which kpsewhich
产量:
/usr/local/bin/kpsewhich
dpkg -S $(which kpsewhich)
产量:
texlive-binaries: /usr/share/man/man1/kpsewhich.1.gz
texlive-binaries: /usr/bin/kpsewhich
dpkg -S $(which tl-paper)
给出:
texlive-base: /usr/bin/tl-paper
我看到你
kpsewhich
在/usr/local/bin/kpsewhich
.考虑将其删除
连同 miktex 缓存:
然后重新运行
texmaker
安装: