实践问题集

本片文章,记录开发测试过程中遇到的所有问题。会持续更新。

1、使用linux,中途断电。重新开机遇到这个问题:

The root filesystem on /dev/sda1 requires a manual fsck

......

(initramfs)

解决方法:其实就是需要我们自己手动使用fsck检查磁盘

(initramfs) fsck /dev/sda1

执行命令后,一路yes,最后修复成功,重启终于回到熟悉的Ubuntu界面。

2、居然也会出现这么入门级的错误,忘记给参数ARCH=arm,导致编译失败。具体问题表现如下:

arm-unknown-linux-gnueabi-gcc: error: unrecognized command line option '-mno-sse'; did you mean '-fno-dse'?
arm-unknown-linux-gnueabi-gcc: error: unrecognized command line option '-mno-mmx'; did you mean '-gno-vms'?
arm-unknown-linux-gnueabi-gcc: error: unrecognized command line option '-mno-sse2'; did you mean '-fno-dse'?
arm-unknown-linux-gnueabi-gcc: error: unrecognized command line option '-mno-3dnow'
arm-unknown-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
arm-unknown-linux-gnueabi-gcc: error: unrecognized command line option '-mno-red-zone'; did you mean '-fno-regmove'?
arm-unknown-linux-gnueabi-gcc: error: unrecognized command line option '-mcmodel=kerne '

解决方法:指定ARCH=arm,编译通过。

3、vi使用16进制查看当前文件的手法,以及回到文本格式。

:%!xxd 16进制查看

:%!xxd -r 回到文本格式

4.The hello.service fails to start with exec format error

解决办法

在脚本第一行添加指定脚本解释器例如#!/bin/bash

将
ls-boot:~ # cat  hello.service
echo hello
改为
ls-boot:~ # cat hello.service 
#!/bin/bash
echo hello

5.预留
 

 

 

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值