No value for $TERM and no -T specified 是什么原因?

Error (use-package): exec-path-from-shell :config: Expected printf output from shell, but got: "__RESULT\0d828b48dad6427ff3adbfc6746bf8719\0d828b48dad6427ff3adbfc6746bf8719\0d828b48dad6427ff3adbfc6746bf8719\0tput: No value for $TERM and no -T specified

系统是啥? login shell 是啥?用的什么终端?

我用的 zshoh-my-zsh的配置

直接打开 emacs 有这个问题,但是在 terminal 中使用 emacs & 就没有这个警告。

追问:哪个版本的 Emacs?

用 Emacs Macport 就直接把这包 exclude 掉。

同样的配置在mac上没有问题,我现在用的 ubuntu,emacs 版本为:

GNU Emacs 27.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2017-10-19
Copyright (C) 2017 Free Software Foundation, Inc.

emacs & 打开的也是 GUI 吧?

分别用两种方式打开 Emacs,然后 M-: (getenv "TERM") 看看有什么不同。