Ubuntu安装海思SDK(转)

问题

海思SDK安装时,无法运行sdk.unpack

原因

BASH 和 DASH 的问题。
Debian和Ubuntu中,/bin/sh默认已经指向dash,这是一个不同于bash的shell,它主要是为了执行脚本而出现,而不是交互,  
它速度更快,但功能相比bash要少很多,语法严格遵守POSIX标准。

解决

方法一

1、vim scripts/common.sh;  第一行, #!/bin/sh 为 #!/bin/bash
2、vim sdk.unpack 第一行, #!/bin/sh 为 #!/bin/bash, 也可以正常解压

方法二

# sudo dpkg-reconfigure dash

Using dash as the system shell will improve the system's overall performance. It does not alter the shell presented to interactive users.

Use dash as the default system shell (/bin/sh)?

选择no

备注

两种方式都可以解决问题,但是海思的SDK中很多sh文件,逐个修改很麻烦,用第二种方式修改系统,一劳永逸!
--------------------- 
作者:SingcolDeng 
来源:CSDN 
原文:https://blog.csdn.net/u013286409/article/details/45305911 
版权声明:本文为博主原创文章,转载请附上博文链接!

原文地址:https://www.cnblogs.com/fensnote/p/13436491.html