在 CentOS 上装 GeneFace++(GeneFace Plus Plus) 报错很常见,主要是因为 CentOS 的 gcc / glibc / Python 版本偏老,而 GeneFace++ 依赖很多较新的深度学习库(PyTorch、CUDA、ffmpeg、numba 等)。
GeneFace++ 强烈不建议直接用系统 Python,建议:
# 推荐
Python 3.9 / 3.10
CUDA 11.7 / 11.8
PyTorch 1.13 / 2.0CentOS 自带 Python 通常是 3.6,直接 pip 装必炸。
✅ 建议做法:
conda create -n geneface python=3.9
conda activate geneface报错示例
error: unable to execute 'gcc': No such file or directory
cc1: error: unrecognized command line option✅ 解决:
sudo yum install -y gcc gcc-c++ make
# 或
conda install -c conda-forge gcc_linux-64 gxx_linux-64如果是老 CentOS(7):
scl enable devtoolset-9 bash报错示例
CUDA not available
undefined symbol: cudaXXX✅ 解决:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118确认:
import torch
print(torch.cuda.is_available())报错示例
ffmpeg not found✅ 解决:
sudo yum install -y ffmpeg ffmpeg-devel
# 或
conda install -c conda-forge ffmpeg报错示例
ImportError: llvmlite not installed✅ 解决(不要 pip 乱升):
conda install numba llvmlite报错示例
error: command 'gcc' failed with exit status 1✅ 解决:
pip install --no-build-isolation fairseq或:
export TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0"报错示例
version `GLIBC_2.29' not found✅ 解决(最稳妥):
docker pull pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel如果你愿意,直接把 完整报错前 30 行 发我,我可以:
你可以说:
“我在 xxx 步骤报这个错:……”
或者
“CentOS 7 + Python 3.9 + CUDA 11.8”
我帮你对症修。