fatal: unable to access 'https://chromium.googlesource.com/webm/libwebp/': Failed to connect to chro

fatal: unable to access ‘https://chromium.googlesource.com/webm/libwebp/’: Failed to connect to chromium.googlesource.com port 443: Operation timed out

解决办法

设置系统全局环境变量 http/https代理:切换到etc目录下

cd /etc 

以管理员身份编辑

sudo vim bashrc 

输入密码进入后, G $ 定位到文件末尾 按下键盘字母 i 开始输入,在最下面位置粘贴下面两句

export http_proxy=127.0.0.1:1087
export https_proxy=127.0.0.1:1087

然后退出保存 按Esc :wq (wq不行 可强制 wq!)

接下来让修改文件生效

source bashrc

最后一步 验证成功:

curl www.google.com 

如果收到google的html数据代表已通,自然git也能访问google code网站 ,执行pod install 就能成功下载libwebp

<think>由于网络问题无法直接克隆chromium.googlesource.com的仓库,我们可以改用GitHub上的镜像仓库 GitHub镜像地址:https://github.com/google/breakpad 因此,使用以下命令克隆: git clone https://github.com/google/breakpad 如果仍然遇到网络问题,可以考虑设置代理或者使用其他镜像源。 另外,也可以尝试使用gitee的镜像(如果有的话),但这里我们主要使用GitHub。 如果以上方法都不行,可以手动下载zip包并解压。 下面提供替代方案:</think>### 解决Breakpad仓库克隆失败问题 #### 替代克隆方法(使用GitHub镜像) ```bash # 使用官方GitHub镜像(推荐) git clone https://github.com/google/breakpad.git # 或使用国内加速镜像 git clone https://gitee.com/mirrors/breakpad.git ``` #### 手动下载方案 1. **访问GitHub仓库**: - 打开 [https://github.com/google/breakpad](https://github.com/google/breakpad) - 点击 "Code" → "Download ZIP" 2. **解压后编译**: ```bash unzip breakpad-master.zip cd breakpad-master ./configure && make ``` #### 网络问题解决方案 ```bash # 方法1:设置Git代理(示例) git config --global http.proxy http://127.0.0.1:1080 git config --global https.proxy https://127.0.0.1:1080 # 方法2:使用SSH协议(需配置SSH密钥) git clone git@github.com:google/breakpad.git # 方法3:使用GitHub CLI工具 gh repo clone google/breakpad ``` #### 验证安装的C++代码 ```cpp #include <iostream> #include "client/linux/handler/exception_handler.h" int main() { google_breakpad::MinidumpDescriptor descriptor("/tmp"); google_breakpad::ExceptionHandler eh(descriptor, nullptr, nullptr, nullptr, true, -1); std::cout << "Breakpad initialized successfully!" << std::endl; // 触发崩溃测试(取消注释执行) // volatile int* ptr = nullptr; // *ptr = 42; return 0; } ``` 编译命令: ```bash g++ -Ibreakpad/src -o test test.cpp breakpad/src/client/linux/libbreakpad_client.a -lpthread ``` #### 常见错误处理 1. **证书验证失败**: ```bash git config --global http.sslVerify false # 临时禁用SSL验证 ``` 2. **IPv6问题**: ```bash git config --global http.https://github.com.proxy "" # 强制使用IPv4 ``` 3. **防火墙限制**: ```bash # 尝试指定端口 git clone https://github.com:443/google/breakpad.git ``` --- ### 根本原因分析 1. **网络限制**: - 部分地区无法访问Google服务(chromium.googlesource.com) - 企业防火墙可能屏蔽非标准端口 2. **DNS污染**: - 某些DNS服务器无法解析Google域名 - 解决方案:使用`8.8.8.8`或`1.1.1.1`公共DNS 3. **TLS/SSL握手失败**: - 旧版Git使用TLS 1.0/1.1(已被现代服务器拒绝) - 更新Git:`git update-git-for-windows` ---
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值