> 下载textshaping包,出现路径依赖错误。
# 解决路径依赖问题
```
conda install -c conda-forge harfbuzz freetype fribidi pkg-config
which pkg-config # 看是否返回路径,返回即正常
find / -name "harfbuzz.pc" 2>/dev/null
find / -name "freetype2.pc" 2>/dev/null
find / -name "fribidi.pc" 2>/dev/null # 获取路径
```
## 找到属于自己的路径
- 例如:
```
/home/hl/anaconda3/pkgs/harfbuzz-9.0.0-hda332d3_1/lib/pkgconfig/harfbuzz.pc
/home/hl/anaconda3/pkgs/harfbuzz-4.3.0-hf52aaf7_2/lib/pkgconfig/harfbuzz.pc
/home/hl/anaconda3/envs/r_env/lib/pkgconfig/harfbuzz.pc
```
选取envs路径
```
export PKG_CONFIG_PATH=/home/hl/anaconda3/envs/r_env/lib/pkgconfig # 具体自己操作将路径换成自己的
```
然后即可正常下载包
```
install.packages("textshaping")
```
library( )可检查是否安装成功
标签:textshaping,ft,lib,路径,pkgconfig,harfbuzz,pc,报错,home From: https://www.cnblogs.com/xiaomaoxilian/p/18536738