I downloaded PSI4-1.8 and 1.8.1 from this website:
Psi4conda-1.8-py39-Linux-x86_64.sh
Psi4conda-1.8.1-py39-Linux-x86_64.sh

After installing the corresponding package and running a diatomic CCSD(T) calculation, I find that the fchk() function would generate an empty .fchk file for PSI4-1.8 and 1.8.1, with a segmentation fault error. But it works normally for PSI4-1.7 (also downloaded from the website shown above). The input file is

molecule HF {
H 0.0 0.0 -0.831975
F 0.0 0.0 0.092442
}
set basis cc-pVTZ
grad, wfn = gradient('CCSD(T)', return_wfn=True)
fchk(wfn,'HF_CCSDpT.fchk')

I think I probably find the answer. This problem is due to a change of default CCSD(T) force/density calculation in PSI4>=1.8, to be more specific, in this commit.

For PSI4>=1.8, numerical nuclear gradients of CCSD(T) are calculated by default. There is no relaxed/unrelaxed density obtained in such case. But for previous versions of PSI4, analytical nuclear gradients are calculated by default, and it will calculate relaxed/unrelaxed density first. This small difference leads to the error of fchk() function.

Currently for PSI4>=1.8, adding set qc_module ccenergy can solve this problem. Here PSI4>=1.8 means 1.8 and 1.8.1, I do not know whether the default will be changed again in the future.