在安裝P4-SDE過程中遇到部分問題,猜測是因爲內核版本太高,特此記錄
降級linux內核版本:
第一步./p4studio_build.py --use-profile p416_examples_profile安裝依賴環境中的在加載bf-driver驅動的時候會出現錯誤:
出現的錯誤爲 :
ar: `u' modifier ignored since `D' is the default (see `U')
error: macro "access_ok" passed 3 arguments, but takes just 2
'access_ok' undeclared (first use in this function)
於是查看了早期的內核版本與當前使用的內核版本的access_ok函數的區別,可見一斑;
早期內核版本linux-image-3.10.87-10-generic
現在正在使用的內核版本linux-image-5.0.0-37-generic
發現問題所在,當前版本內核太高
接下來就是準備對Linux的內核進行降級了
vi ~/etc/apt/sources.list
root模式下進入文件夾,對文件備份
deb http://security.ubuntu.com/ubuntu trusty-security main
在最後一行添加軟件源地址
apt-get update
訪問源列表裏的每個網址,並讀取軟件列表,然後保存在本地電腦
查詢列表中可更新的內核:sudo apt-cache search linux-image
安裝4.4版本內核: apt-get install linux-image-extra-4.4.0-109-generic
查看是否安裝成功: dpkg -l |grep linux-image
進入grub文件:vim /etc/default/grub
修改文件如下:Advanced options for Ubuntu>Ubuntu, with Linux 4.4.0-109-generic
更新grub: update-grub
重啓後重新查看內核版本,發現已經完成內核降級: uname -a