一般来讲有两种情况,第一种是文件缺失问题,第二种是权限问题
1.缺失文件
报错如下
Could not create share link. Missing file: /root/miniconda3/envs/textgen/lib/python3.11/site-packages/gradio/frpc_linux_amd64_v0.2.
Please check your internet connection. This can happen if your antivirus software blocks the download of this file. You can install manually by following these steps:
1. Download this file: https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_linux_amd64
2. Rename the downloaded file to: frpc_linux_amd64_v0.2
3. Move the file to this location: /root/miniconda3/envs/textgen/lib/python3.11/site-packages/gradio
只需要按照提示的步骤1)下载文件2)重命名3)移动文件到指定位置即可
wget https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_linux_amd64
mv frpc_linux_amd64 frpc_linux_amd64_v0.2
mv frpc_linux_amd64_v0.2 /root/miniconda3/envs/fa/lib/python3.8/site-packages/gradio
#注意这里改成你自己的路径
2.缺少权限
当按照第一步解决文件缺失问题之后如果依然出现报错
warnings.warn(
Running on local URL: http://127.0.0.1:7860
Could not create share link. Please check your internet connection or our status page: https://status.gradio.app.
这时候大概率是权限问题,只需给该文件增加可执行权限即可:
cd /root/miniconda3/envs/fa/lib/python3.8/site-packages/gradio
#注意这里替换成你自己的路径
chmod +x frpc_linux_amd64_v0.2