實踐問題集

本片文章,記錄開發測試過程中遇到的所有問題。會持續更新。

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.預留
 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章