安装org启动报错

Warning (initialization): An error occurred while loading ‘d:/emacs-26.3-x86_64/.emacs’:

error: Invalid face, diary-face

To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the ‘–debug-init’ option to view a complete error backtrace.

以下是我的配置
(require 'org)

你有在(require 'org)前面加入(package-initialize)吗?

有的,这安装这个插件的时候就报过错。以下是报错内容。
Leaving directory ‘d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929’

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-C.el at Sat Jan  1 16:47:02 2022
Entering directory ‘d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/’

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-R.el at Sat Jan  1 16:47:03 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-awk.el at Sat Jan  1 16:47:03 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-calc.el at Sat Jan  1 16:47:03 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-clojure.el at Sat Jan  1 16:47:03 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-comint.el at Sat Jan  1 16:47:03 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-core.el at Sat Jan  1 16:47:03 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-css.el at Sat Jan  1 16:47:03 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-ditaa.el at Sat Jan  1 16:47:03 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-dot.el at Sat Jan  1 16:47:03 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-emacs-lisp.el at Sat Jan  1 16:47:04 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-eshell.el at Sat Jan  1 16:47:04 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-eval.el at Sat Jan  1 16:47:04 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-exp.el at Sat Jan  1 16:47:04 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-forth.el at Sat Jan  1 16:47:04 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-fortran.el at Sat Jan  1 16:47:04 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-gnuplot.el at Sat Jan  1 16:47:04 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-groovy.el at Sat Jan  1 16:47:04 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-haskell.el at Sat Jan  1 16:47:04 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-java.el at Sat Jan  1 16:47:04 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-js.el at Sat Jan  1 16:47:04 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-julia.el at Sat Jan  1 16:47:04 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-latex.el at Sat Jan  1 16:47:05 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-lilypond.el at Sat Jan  1 16:47:05 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-lisp.el at Sat Jan  1 16:47:05 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-lob.el at Sat Jan  1 16:47:05 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-lua.el at Sat Jan  1 16:47:05 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-makefile.el at Sat Jan  1 16:47:05 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-matlab.el at Sat Jan  1 16:47:05 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-maxima.el at Sat Jan  1 16:47:05 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-ocaml.el at Sat Jan  1 16:47:05 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-octave.el at Sat Jan  1 16:47:05 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-org.el at Sat Jan  1 16:47:05 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-perl.el at Sat Jan  1 16:47:05 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-plantuml.el at Sat Jan  1 16:47:05 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-processing.el at Sat Jan  1 16:47:05 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-python.el at Sat Jan  1 16:47:05 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-ref.el at Sat Jan  1 16:47:05 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-ruby.el at Sat Jan  1 16:47:06 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-sass.el at Sat Jan  1 16:47:06 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-scheme.el at Sat Jan  1 16:47:06 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-screen.el at Sat Jan  1 16:47:06 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-sed.el at Sat Jan  1 16:47:06 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-shell.el at Sat Jan  1 16:47:06 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-sql.el at Sat Jan  1 16:47:06 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-sqlite.el at Sat Jan  1 16:47:06 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-table.el at Sat Jan  1 16:47:06 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob-tangle.el at Sat Jan  1 16:47:06 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ob.el at Sat Jan  1 16:47:06 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/oc-basic.el at Sat Jan  1 16:47:06 2022
oc-basic.el:70:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/oc-biblatex.el at Sat Jan  1 16:47:07 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/oc-csl.el at Sat Jan  1 16:47:07 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/oc-natbib.el at Sat Jan  1 16:47:07 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/oc.el at Sat Jan  1 16:47:07 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ol-bbdb.el at Sat Jan  1 16:47:07 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ol-bibtex.el at Sat Jan  1 16:47:07 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ol-docview.el at Sat Jan  1 16:47:07 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ol-doi.el at Sat Jan  1 16:47:07 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ol-eshell.el at Sat Jan  1 16:47:07 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ol-eww.el at Sat Jan  1 16:47:08 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ol-gnus.el at Sat Jan  1 16:47:08 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ol-info.el at Sat Jan  1 16:47:08 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ol-irc.el at Sat Jan  1 16:47:08 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ol-mhe.el at Sat Jan  1 16:47:08 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ol-rmail.el at Sat Jan  1 16:47:08 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ol-w3m.el at Sat Jan  1 16:47:08 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ol.el at Sat Jan  1 16:47:08 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-agenda.el at Sat Jan  1 16:47:08 2022
org-agenda.el:50:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-archive.el at Sat Jan  1 16:47:08 2022
org-archive.el:31:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-attach-git.el at Sat Jan  1 16:47:08 2022
org-attach-git.el:32:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-attach.el at Sat Jan  1 16:47:08 2022
org-attach.el:38:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-capture.el at Sat Jan  1 16:47:08 2022
org-capture.el:51:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-clock.el at Sat Jan  1 16:47:09 2022
org-clock.el:32:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-colview.el at Sat Jan  1 16:47:09 2022
org-colview.el:32:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-compat.el at Sat Jan  1 16:47:09 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-crypt.el at Sat Jan  1 16:47:09 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-ctags.el at Sat Jan  1 16:47:09 2022
org-ctags.el:141:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-datetree.el at Sat Jan  1 16:47:09 2022
org-datetree.el:33:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-duration.el at Sat Jan  1 16:47:09 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-element.el at Sat Jan  1 16:47:09 2022
org-element.el:64:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-entities.el at Sat Jan  1 16:47:09 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-faces.el at Sat Jan  1 16:47:09 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-feed.el at Sat Jan  1 16:47:09 2022
org-feed.el:91:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-footnote.el at Sat Jan  1 16:47:09 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-goto.el at Sat Jan  1 16:47:10 2022
org-goto.el:25:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-habit.el at Sat Jan  1 16:47:10 2022
org-habit.el:32:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-id.el at Sat Jan  1 16:47:10 2022
org-id.el:73:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-indent.el at Sat Jan  1 16:47:10 2022
org-indent.el:41:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-inlinetask.el at Sat Jan  1 16:47:10 2022
org-inlinetask.el:81:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-keys.el at Sat Jan  1 16:47:10 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-lint.el at Sat Jan  1 16:47:10 2022
org-lint.el:111:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-list.el at Sat Jan  1 16:47:10 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-macro.el at Sat Jan  1 16:47:10 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-macs.el at Sat Jan  1 16:47:10 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-mobile.el at Sat Jan  1 16:47:11 2022
org-mobile.el:35:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-mouse.el at Sat Jan  1 16:47:11 2022
org-mouse.el:139:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-num.el at Sat Jan  1 16:47:11 2022
org-num.el:66:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-pcomplete.el at Sat Jan  1 16:47:11 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-plot.el at Sat Jan  1 16:47:11 2022
org-plot.el:35:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-protocol.el at Sat Jan  1 16:47:11 2022
org-protocol.el:132:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-refile.el at Sat Jan  1 16:47:11 2022
org-refile.el:29:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-src.el at Sat Jan  1 16:47:11 2022

In org-edit-src-save:
org-src.el:1227:14:Warning: replace-buffer-contents called with 3 arguments,
    but accepts only 1

In org-edit-src-exit:
org-src.el:1275:15:Warning: replace-buffer-contents called with 3 arguments,
    but accepts only 1

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-table.el at Sat Jan  1 16:47:11 2022

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-tempo.el at Sat Jan  1 16:47:12 2022
org-tempo.el:43:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org-timer.el at Sat Jan  1 16:47:12 2022
org-timer.el:39:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/org.el at Sat Jan  1 16:47:12 2022
org.el:78:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ox-ascii.el at Sat Jan  1 16:47:12 2022
ox-ascii.el:31:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ox-beamer.el at Sat Jan  1 16:47:12 2022
ox-beamer.el:34:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ox-html.el at Sat Jan  1 16:47:12 2022
ox-html.el:36:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ox-icalendar.el at Sat Jan  1 16:47:12 2022
ox-icalendar.el:36:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ox-koma-letter.el at Sat Jan  1 16:47:12 2022
ox-koma-letter.el:169:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ox-latex.el at Sat Jan  1 16:47:12 2022
ox-latex.el:30:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ox-man.el at Sat Jan  1 16:47:12 2022
ox-man.el:41:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ox-md.el at Sat Jan  1 16:47:12 2022
ox-md.el:33:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ox-odt.el at Sat Jan  1 16:47:12 2022
ox-odt.el:32:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ox-org.el at Sat Jan  1 16:47:12 2022
ox-org.el:28:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ox-publish.el at Sat Jan  1 16:47:13 2022
ox-publish.el:43:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ox-texinfo.el at Sat Jan  1 16:47:13 2022
ox-texinfo.el:30:1:Error: Invalid face: diary-face

Compiling file d:/emacs-26.3-x86_64/.emacs.d/elpa/org-20210929/ox.el at Sat Jan  1 16:47:13 2022
ox.el:78:1:Error: Invalid face: diary-face

Compiling no file at Sat Jan  1 16:47:13 2022

有尝试过卸载org再重装吗?

我用 Emacs 27 没有这个问题,你是不是可以尝试升级一下 Emacs?

尝试过了没用

(require 'diary-lib) ;; or (require 'calendar)
(package-reinstall 'org)

谢了老哥,就是我设置日历的原因取消设置或者使用(require 'diary-lib)不用取消日历的配置也行