【环境安装】fuse & libfuse-dev

本文介绍了一种常见错误“Package fuse was not found in the pkg-config search path”的解决方案,该问题通常发生在尝试编译依赖于fuse的软件时。文章指出,即使fuse已安装,也可能因为缺少libfuse-dev库而出现此错误。通过运行'sudo apt-get install libfuse-dev'可以解决这个问题。
部署运行你感兴趣的模型镜像
Package fuse was not found in the pkg-config search path.
Perhaps you should add the directory containing `fuse.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fuse' found

#include <fuse.h>
          ^~~~~~~~
compilation terminated.

跑别人代码的时候发现这样一个报错,但是发现fuse其实已经安装了

sudo apt-get install fuse

其实是因为缺少另一个库,叫libfuse-dev

运行如下代码安装即可

sudo apt-get install libfuse-dev

 

您可能感兴趣的与本文相关的镜像

GPT-SoVITS

GPT-SoVITS

AI应用

GPT-SoVITS 是一个开源的文本到语音(TTS)和语音转换模型,它结合了 GPT 的生成能力和 SoVITS 的语音转换技术。该项目以其强大的声音克隆能力而闻名,仅需少量语音样本(如5秒)即可实现高质量的即时语音合成,也可通过更长的音频(如1分钟)进行微调以获得更逼真的效果

1217 static ssize_t fuse_dev_do_read(struct fuse_dev *fud, struct file *file, 1218 struct fuse_copy_state *cs, size_t nbytes) 1219 { 1220 ssize_t err; 1221 struct fuse_conn *fc = fud-&gt;fc; 1222 struct fuse_iqueue *fiq = &amp;fc-&gt;iq; 1223 struct fuse_pqueue *fpq = &amp;fud-&gt;pq; 1224 struct fuse_req *req; 1225 struct fuse_args *args; 1226 unsigned reqsize; 1227 unsigned int hash; 1228 1229 /* 1230 * Require sane minimum read buffer - that has capacity for fixed part 1231 * of any request header + negotiated max_write room for data. 1232 * 1233 * Historically libfuse reserves 4K for fixed header room, but e.g. 1234 * GlusterFS reserves only 80 bytes 1235 * 1236 * = `sizeof(fuse_in_header) + sizeof(fuse_write_in)` 1237 * 1238 * which is the absolute minimum any sane filesystem should be using 1239 * for header room. 1240 */ 1241 if (nbytes &lt; max_t(size_t, FUSE_MIN_READ_BUFFER, 1242 sizeof(struct fuse_in_header) + 1243 sizeof(struct fuse_write_in) + 1244 fc-&gt;max_write)) 1245 return -EINVAL; 1246 1247 restart: 1248 for (;;) { 1249 spin_lock(&amp;fiq-&gt;lock); 1250 if (!fiq-&gt;connected || request_pending(fiq)) 1251 break; 1252 spin_unlock(&amp;fiq-&gt;lock); 1253 1254 if (file-&gt;f_flags &amp; O_NONBLOCK) 1255 return -EAGAIN; 1256 err = wait_event_interruptible_exclusive(fiq-&gt;waitq, 1257 !fiq-&gt;connected || request_pending(fiq)); 1258 if (err) 1259 return err; 1260 } 1261 1262 if (!fiq-&gt;connected) { 1263 err = fc-&gt;aborted ? -ECONNABORTED : -ENODEV; 1264 goto err_unlock; 1265 } 1266 1267 if (!list_empty(&amp;fiq-&gt;interrupts)) { 1268 req = list_entry(fiq-&gt;interrupts.next, struct fuse_req, 1269 intr_entry); 1270 return fuse_read_interrupt(fiq, cs, nbytes, req); 1271 } 1272 1273 if (forget_pending(fiq)) { 1274 if (list_empty(&amp;fiq-&gt;pending) || fiq-&gt;forget_batch-- &gt; 0) 1275 return fuse_read_forget(fc, fiq, cs, nbytes); 1276 1277 if (fiq-&gt;forget_batch &lt;= -8) 1278 fiq-&gt;forget_batch = 16; 1279 } 1280 1281 req = list_entry(fiq-&gt;pending.next, struct fuse_req, list); 1282 clear_bit(FR_PENDING, &amp;req-&gt;flags); 1283 list_del_init(&amp;req-&gt;list); 1284 spin_unlock(&amp;fiq-&gt;lock); 1285 1286 args = req-&gt;args; 1287 reqsize = req-&gt;in.h.len; 1288 1289 /* If request is too large, reply with an error and restart the read */ 1290 if (nbytes &lt; reqsize) { 1291 req-&gt;out.h.error = -EIO; 1292 /* SETXATTR is special, since it may contain too large data */ 1293 if (args-&gt;opcode == FUSE_SETXATTR) 1294 req-&gt;out.h.error = -E2BIG; 1295 fuse_request_end(req); 1296 goto restart; 1297 } 1298 spin_lock(&amp;fpq-&gt;lock); 1299 /* 1300 * Must not put request on fpq-&gt;io queue after having been shut down by 1301 * fuse_abort_conn() 1302 */ 1303 if (!fpq-&gt;connected) { 1304 req-&gt;out.h.error = err = -ECONNABORTED; 1305 goto out_end; 1306 1307 } 1308 list_add(&amp;req-&gt;list, &amp;fpq-&gt;io); 1309 spin_unlock(&amp;fpq-&gt;lock); 1310 cs-&gt;req = req; 1311 err = fuse_copy_one(cs, &amp;req-&gt;in.h, sizeof(req-&gt;in.h)); 1312 if (!err) 1313 err = fuse_copy_args(cs, args-&gt;in_numargs, args-&gt;in_pages, 1314 (struct fuse_arg *) args-&gt;in_args, 0); 1315 fuse_copy_finish(cs); 1316 spin_lock(&amp;fpq-&gt;lock); 1317 clear_bit(FR_LOCKED, &amp;req-&gt;flags); 1318 if (!fpq-&gt;connected) { 1319 err = fc-&gt;aborted ? -ECONNABORTED : -ENODEV; 1320 goto out_end; 1321 } 1322 if (err) { 1323 req-&gt;out.h.error = -EIO; 1324 goto out_end; 1325 } 1326 if (!test_bit(FR_ISREPLY, &amp;req-&gt;flags)) { 1327 err = reqsize; 1328 goto out_end; 1329 } 1330 hash = fuse_req_hash(req-&gt;in.h.unique); 1331 list_move_tail(&amp;req-&gt;list, &amp;fpq-&gt;processing[hash]); 1332 __fuse_get_request(req); 1333 set_bit(FR_SENT, &amp;req-&gt;flags); 1334 spin_unlock(&amp;fpq-&gt;lock); 1335 /* matches barrier in request_wait_answer() */ 1336 smp_mb__after_atomic(); 1337 if (test_bit(FR_INTERRUPTED, &amp;req-&gt;flags)) 1338 queue_interrupt(req); 1339 fuse_put_request(req); 1340 1341 return reqsize; 1342 1343 out_end: 1344 if (!test_bit(FR_PRIVATE, &amp;req-&gt;flags)) 1345 list_del_init(&amp;req-&gt;list); 1346 spin_unlock(&amp;fpq-&gt;lock); 1347 fuse_request_end(req); 1348 return err; 1349 1350 err_unlock: 1351 spin_unlock(&amp;fiq-&gt;lock); 1352 return err; 1353 } 1354 帮我把序号去掉并解析一下这个函数
08-13
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值