【RealSense】修复RealSense相机SDK在Ubuntu 18.04上的安装问题(ubuntu kernel not found)

最近在安装RealSense相机SDK时,遇到了一个小问题,特此分享解决方法。我参考了一篇教程(链接:https://blog.csdn.net/Time_Memory_cici/article/details/128640596),在执行./scripts/patch-realsense-ubuntu-lts.sh这一步时,终端报错如下:

Package required libusb-1.0-0-dev:  - found
Package required libssl-dev:  - found
Create patches workspace in ubuntu-bionic-hwe-5.4 folder
Package required libelf-dev:  - found
Package required elfutils:  - found
Package required bison:  - found
Package required flex:  - found
fatal: repository 'https://kernel.ubuntu.com/ubuntu/ubuntu-bionic.git/' not found
Fetching Ubuntu LTS tag   to the local kernel sources folder
fatal: 您需要指定一个标签名称。

主要问题出在"https://kernel.ubuntu.com/ubuntu/ubuntu-bionic.git/"似乎已经不再可用。通过查询,发现将网址修改为"https://kernel.ubuntu.com/git/ubuntu/ubuntu-bionic.git/"即可解决这个问题。具体操作如下:

  1. 使用文本编辑器(比如vim、gedit、vscode等)打开文件:/librealsense/scripts/patch-realsense-ubuntu-lts.sh

  2. 找到第102行开始的代码块:

# Get the linux kernel and change into source tree
if [ ! -d ${kernel_name} ]; then
    mkdir ${kernel_name}
    cd ${kernel_name}
    git init
    git remote add origin https://kernel.ubuntu.com/ubuntu/ubuntu-${ubuntu_codename}.git
    cd ..
fi
  1. 将上述代码块中的https://kernel.ubuntu.com/ubuntu/ubuntu-${ubuntu_codename}.git修改为https://kernel.ubuntu.com/git/ubuntu/ubuntu-${ubuntu_codename}.git

  2. 保存文件。

  3. 在重新运行"./scripts/patch-realsense-ubuntu-lts.sh"指令之前,删除librealsense下新建的"ubuntu-bionic-hwe-5.4"文件夹。这一步很重要,否则不会进入if语句。

通过以上步骤,应该能够成功修复这个问题并顺利完成RealSense相机SDK的安装。希望对你有帮助!

  • 13
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值