CentOS 5/6/7使用摘記

[問題]
[解決]

 

[問題] 異常斷電,linux虛擬機系統磁盤mount失敗,導致無法啓動  /run/initramfs/rdsosreport.txt
[解決] https://blog.csdn.net/glongljl/article/details/80157162

[問題] centos7 WARNING: terminal is not fully functional
[解決] export TERM=xterm

         yum install xterm

 

[問題]  CentOS7 和 win7 雙系統引導, 先安裝的win7在硬盤的前60G空間,後安裝CentOS7在接下來的60G空間。
[解決] 需要在CentOS7的引導配置中添加對win7的引導。

vim /boot/grub2/grub.cfg

添加win7的引導

menuentry ‘windows 7’ {

                    set root=‘hd0, msdos1’

                    chainloader +1

}

需要注意的是set root=‘hd0, msdos1’可能需要調整,可能是set root=‘hd0, msdos0’, 根據實際做調整。

 

[問題] CentOS7 中查看哪些服務開機啓動的,哪些是禁止啓動的
[解決] [harvis@centos7 ~]$ systemctl  list-unit-files | grep enabled

          [harvis@centos7 ~]$ systemctl  list-unit-files | grep disabled

 

[問題] CentOS 7 Zstack 調節最小cpu數和最小內存數的地方
[解決] [harvis@centos7 zstack]$ sudo vim /var/lib/zstack/virtualenv/zstackctl/lib/python2.7/site-packages/zstackctl/ctl.py

裏面

    MINIMAL_CPU_NUMBER = 2
    #MINIMAL_MEM_SIZE unit is KB, here is 6GB, in linxu, 6GB is 5946428 KB
    #Save some memory for kdump etc. The actual limitation is 5000000KB
    MINIMAL_MEM_SIZE = 1500000


[問題] server A ssh 無密碼登錄 server B
[解決] server A: ssh-keygen

                         ssh-copy-id -i ~/.ssh/id_rsa.pub B

                         ssh B

 

[問題] npm install tsc/webpack

[解答] sudo npm install -g typescript/

sudo npm install -g webpack

sudo npm install -g asar prebuild node-gyp

tsc is a compiler for converting TypeScript into plain JavaScript. NVIC_INT_CTRL

 

[問題] bhyve/Centos7 添加一塊硬盤(塊設備)

[解答]

 

host 中創建一塊ZFS分區作爲Centos7的一塊硬盤
sudo zfs create -V16G -o volmode=dev zroot/AOSP
將ZFS分區分配給虛擬機Centos7, 這裏用irtio-blk實現
-s 3:5,virtio-blk,/dev/zvol/zroot/AOSP \    
guest 查看新添加的硬盤
lsblk 可以看到 /dev/vdd

 

創建分區

sudo fdisk /dev/vdd

n

t 選擇 83

對創建的分區進行格式化(創建XFS文件系統)

[harvis@centos7 ~]$ sudo mkfs.xfs /dev/vdd1

臨時掛載(mount)

sudo mount -t xfs /dev/vdd1 /AOSP

sudo chown -R harvis:harvis /AOSP/

長久掛載

echo "" >> /etc/fstab

 

[問題] Centos7 查看塊設備的 uuid
[解決] [harvis@centos7 ~]$ lsblk -o +UUID
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT  UUID
sr0     11:0    1  564M  0 rom              2015-03-28-20-08-41-00
vda    253:0    0   16G  0 disk             
├─vda1 253:1    0  500M  0 part /boot       7ee72903-16fe-4d51-a064-ec8ea4cbe0b4

 

只有在分區格式化之後纔有 UUID。

 

[問題][harvis@localhost Desktop]$ adb shell

error: insufficient permissions for device

[解答]

cat /etc/udev/rules.d/51-android.rules

# Google Inc. Nexus Device (debug)

SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee2", MODE="0666", GROUP="plugdev"

sudo systemctl restart systemd-udev-trigger.service

 

[問題] libudev.so not found in Centos7
[解決] sudo yum install -y systemd-devel-219-30.el7_3.7.x86_64
         ls /lib64/libudev.so*

 

 

[問題] 編譯gcc4.8報錯: configure: error: cannot compute suffix of object files: cannot compile
[解決] # update LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/share/cross-compiler/lib/
 

 

[問題] node.js software list

[解答]

nodejs-6.9.4-2.el7.x86_64

npm-3.10.10-1.6.9.4.2.el7.x86_64

npm install -g cnpm --registry=https://registry.npm.taobao.org

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")

 

 

 

[問題] minicom

[解答] hg clone https://alioth.debian.org/anonscm/hg/minicom/

REF: https://alioth.debian.org/scm/?group_id=30018

 

[問題] Centos7 MSYH font
[解決] copy msyh.tff msyhbd.tff to /usr/share/fonts/msyh

 

         cd /usr/share/fonts/msyh

         sudo fc-cache

         sudo fc-list | grep msyh

         export LANG=zh_CN.UTF-8

         cat chinese.txt

 

[問題] Centos7 mini install XFCE4
[解決] yum check-update

         yum groupinstall "X Window System"

         yum install epel-release

         yum groupinstall xfce
         systemctl isolate graphical.target ## 臨時生效

         systemctl set-default graphical.target ## 長期生效,參考/etc/inittab說明


 

[問題] CentOS7安裝中文語言包
[解決] sudo yum groupinstall chinese-support # for Centos6

          sudo yum install kde-l10n-Chinese-4.10.5-2.el7.noarch # for Centos7

 

[問題] CentOS7 VNC/xfreerdp setting

[解答] https://linux.cn/article-5335-1.html

 

[問題] centos7 libxss.so.1
[解決] yum whatprovides libXss*

 

[問題] CentOS7 install man manual
[解決] sudo yum install man-pages

 

[問題] Centos7 add a swap disk
[解決] cat /proc/swaps

fdisk /dev/vdb

n

t

82(Linux Swap / Solaris)

 

mkswap /dev/sdb1

swapon /dev/vdb1

cat /etc/fstab

/dev/vdb1(or UUID) swap swap defaults 0 0

 

[問題] centos6.8 static ip address setting
[解決]

[root@localhost network-scripts]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:A0:98:8B:32:4E
TYPE=Ethernet
UUID=f99713b2-65e3-49eb-942e-affdff7b29e0
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.1.239
NETMASK=255.255.255.0
NETWORK=192.168.1.1
BROADCAST=192.168.1.255

 

[問題] centos6.8 change hostname
[解決]

 

vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=newHostName

 

 

 

[問題] how to configure grub.cfg for centos6 boot on bhyve
[解決] cat grub.cfg

set root=(hd0,msdos1)
linux  /vmlinuz-2.6.32-642.el6.x86_64 root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 console=ttyS0 crashkernel=auto rd_LVM_LV=VolGroup/lv_root  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
initrd /initramfs-2.6.32-642.el6.x86_64.img
boot

參考: https://forums.freebsd.org/threads/55521/

 

[問題] linux kernel map 描述 linux kernel數據結構的全圖
[解答] http://www.makelinux.net/kernel_map/

 

[問題] 在 CentOS7中安裝 KVM virt-manager 替換 virtualbox/vmware,  guest 安裝 windows xp 需要的 外設驅動, 下載地址
[解決]

 

This location, and the isos that were hosted here, are now deprecated.

virtio-win builds are now distributed in a new location with a new iso file
layout. A yum repo is also provided. More info here:

  https://fedoraproject.org/wiki/Windows_Virtio_Drivers

Links to the _new_ equivalent of the old stable/ and latest/ directories are
listed here:

  https://fedoraproject.org/wiki/Windows_Virtio_Drivers#Direct_download

If you need access to the old isos that were hosted here, there's a mirror at:

  https://fedorapeople.org/groups/virt/virtio-win/deprecated-isos/

Only use them if you need to maintain backwards compatability. No new isos
will be added here.

 

 

 

[問題] /lib/modules/3.10.0-513.el7.x86_64/build: No such file or directory

         安裝kernel代碼的方法?

[解決] sudo yum install kernel-devel-$(uname -r)

 

[問題] CentOS7網絡開機自啓動的方法
[解決] sudo vi /etc/sysconfig/network-scripts/ifcfg-enp3s0

ONBOOT=no 修改爲 ONBOOT=yes

 

[問題] CentOS7 安裝 cmake3 的方法
[解決]  sudo wget https://copr.fedorainfracloud.org/coprs/g/kdesig/cmake3_EPEL/repo/epel-7/heliocastro-cmake3_EPEL-epel-7.repo /etc/yum.repos.d/

            sudo yum install cmake3  

 

[問題] CentOS 7 安裝QT Desinger工具的方法
[解決] sudo yum install -y qt5-designer-5.6.1-2.el7.x86_64

 

[問題] centos6 netinstall method
[解決] http://www.if-not-true-then-false.com/2011/centos-6-netinstall-network-installation/

 

[問題] CentOS7 安裝 google chrome方法
[解決] http://www.tecmint.com/install-google-chrome-on-redhat-centos-fedora-linux/

[user]$ cat /etc/yum.repos.d/google-chrome.repo
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

 

 

[問題] How to change the system locale on RHEL7/CentOS7 ?
[解決] https://access.redhat.com/solutions/974273

[問題] centos7開啓coredump的方法
[解決] http://www.kibinlabs.com/re-enabling-core-dumps-redhat-7/

 

[問題] centos7 中網絡故障,  systemctl status network.service查看到錯誤信息"Failed to start LSB: Bring up/down networking.", 網絡不可用
[解決] MAC 地址丟失的緣故. 獲取MAC地址的方法, 執行命令[ ip addr show]取字符串[f8:32:e4:8c:03:7f ], 構造ifcfg配置語句[HWADDR="f8:32:e4:8c:03:7f"]

            添加到網卡配置文件中, 比如/etc/sysconfig/network-scripts/ifcfg-enp3s0, 重啓網絡服務systemctl restart network即可.

 

[問題] yum源設置
[解決]

    cd /etc/yum.repos.d/

    wget http://mirrors.163.com/.help/CentOS-Base-163.repo

    yum check-update

    yum update

    注意不需要更改文件名,按步驟操作即可。後面兩步其實是把系統和軟件包都給更新了。直接把centos5.5升級到5.10了。

2. aliyun yum源的配置

    參考:http://mirrors.aliyun.com/help/centos

3. 安裝glibc 2.11的步驟

   參考:http://hi.baidu.com/life_to_you/item/64db6dce367486dbef183b07 

               http://blog.csdn.net/duyiwuer2009/article/details/6867159

               http://blog.csdn.net/nameofhsw/article/details/12781905 

               http://www.oschina.net/code/explore/gcc-4.5.2/gcc/config/i386/cpuid.h

4. yum命令安裝程序時,總是出現如下警告:

There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.

意思是有未完成的yum事務,建議先運行yum-complete-transaction命令清除。消除警告步驟如下:

# 安裝 yum-complete-transaction(這是一個能發現未完成或被中斷的yum事務的程序)
yum install yum-utils
# 清除yum緩存
yum clean all
# 運行 yum-complete-transaction,清理未完成事務
/usr/sbin/yum-complete-transaction --cleanup-only
運行上述命令需要root權限。yum 會把下載的軟件包和header存儲在cache中,而不會自動刪除。可用yum clean headers清除header,yum clean packages清除下載的rpm包,yum clean all全清

5.  編輯DNS服務器IP地址

# vi /etc/resolv.conf

nameserver 8.8.8.8 #google域名服務器
nameserver 8.8.4.4 #google域名服務器

6. 更改系統時間和日期

修改日期: 
時間設定成2009年5月10日的命令如下: 
#date -s 05/10/2009 

 

修改時間: 
將系統時間設定成上午10點18分0秒的命令如下。 
#date -s 10:18:00 

 

修改時區: 
找到相應的時區文件 /usr/share/zoneinfo/Asia/Shanghai替換當前的/etc/localtime。 
修改/etc/sysconfig/clock文件的內容爲: 
ZONE=”Asia/Shanghai” 
UTC=false 
ARC=false 

 

同步bios時間: 
同步BIOS時鐘,強制把系統時間寫入CMOS,命令如下: 
#clock -w 
 

參考:http://www.cnblogs.com/hjslovewcl/archive/2011/06/28/2314323.html

CentOS 6.5(32位)編譯 安裝 subversion 1.6.11
 
1.  源碼包
subversion-1.6.11.tar.bz2
subversion-deps-1.6.11.tar.bz2
neon-0.29.3.tar.gz
subversion-1.6.11.tar.bz2
subversion-deps-1.6.11.tar.bz2
neon-0.29.3.tar.gz
   
2.  解壓到同一個目錄下面
tar xvf  subversion-1.6.11.tar.bz2
tar xvf  subversion-deps-1.6.11.tar.bz2
3.  將subversion-1.6.11/neon裏面的內容全部刪除掉,將neon-0.29.3.tar.gz解壓進去subversion-1.6.11/neon
tar xvf neon-0.29.3.tar.gz -C subversion-1.6.11/neon
這一步若不用neon-0.29.3.tar.gz替代subversion-1.6.11/neon編譯會報錯,
subversion-1.6.11/subversion/libsvn_ra_neon/.libs/libsvn_ra_neon-1.so:undefined reference to `SSL_SESSION_cmp'
collect2: ld returned 1 exit status

 

 

CentOS升級Python到2.7

CentOS 6.3上安裝的python版本是2.6,不能滿足我運行軟件的要求,所以對python進行升級。

Python的最新版本已經是3.3,但是Python3的兼容性可能還有一定的問題,所以還是升級到2.7較爲保險。Python 2.7也能夠滿足絕大多數的軟件需求了。

原以爲這也就是安裝個軟件的事兒,在我求穩搜索一下了之後發現,也並不是那麼單純簡單。

下載,解壓,編譯,安裝,這些都是常規操作了。據說系統自帶的舊版本python被嚴重依賴,所以不能卸載原Python,這裏選擇全新安裝。

1

2

3

4

5

tar -xvf Python-2.7.3.tgz

cd Python-2.7.3

./configure --prefix=/usr/local/python2.7

make

make install

安裝好後可以運行一下Python看看是否正常了

1

/usr/local/python2.7/bin/python2.7-V

其他的文章提到python都是在/usr/local/bin目錄裏的,但是我沒有找到,而是在/usr/local/python2.7/bin/裏。

接下來需要創建一個鏈接來使系統默認python變爲python2.7。

1

ln -fs /usr/local/python2.7/bin/python2.7 /usr/bin/python

運行python查看版本

1

python-V

進行更改後,yum果然無法運行了。修改/usr/bin/yum文件,將第一行的

1

#!/usr/bin/python

中的python改爲系統原有的python版本,我的如下:

1

#!/usr/bin/python2.6

到此完畢。

轉自:http://nerd-is.in/2013-03/upgrade-python/

 

【問題】ImportError: No module named pysqlite2

【解答】

 

The module is called sqlite3pysqlite2 was the module's name before it became part of the Python standard library.

You probably want to use this in your code:

import sqlite3

And the standard documentation is here: http://docs.python.org/library/sqlite3.html

edit: And just to cover all the bases:

The sqlite3 module also has a dbapi2 sub-member, but you don't need to use it directly. The sqlite3 module exposes all the dbapi2 members directly.

 

摘自:http://stackoverflow.com/questions/12044548/importerror-no-module-named-pysqlite2

 

 

【問題】 /usr/src/kernels/2.6.32-573.8.1.el6.x86_64/arch/x86/Makefile:81: stack protector enabled but no compiler support

【解答】因爲檢測到了CROSS_COMPILE有定義,去掉CROSS_COMPILE的定義即可

obj-m = call_usermodehelper.o
CROSS_COMPILE=
all:
        $(MAKE) -C /lib/modules/`uname -r`/build M=`pwd` modules
clean:
        rm -f call_usermodehelper.ko.unsigned  call_usermodehelper.mod.o  Module.symvers \
        call_usermodehelper.ko  call_usermodehelper.mod.c        call_usermodehelper.o      modules.order

 

[問題] centos7 中掛載windows格式的移動硬盤
[解決] sudo mount -t ntfs /dev/sdc1 /mnt/
      其中, /dev/sdc1用命令ls /dev/sd*查看

[問題] centos7 上安裝32位libgtk-x11-2.0.so.0的命令
[解決] sudo yum install gtk2-2.24.28-8.el7.i686

[問題] add nux desktop repository in centos7
[解決] sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm
      sudo yum update

[問題] Can't locate Switch.pm in @INC
[解決] yum install perl-Switch

[問題] centos7 打造android開發環境 TODO
[解決] http://tinylab.org/develop-android-under-centos7/

[問題] Linux Centos udev重啓命令問題
[解決] root用戶直接執行:start_udev # for Centos 6.5

sudo systemctl restart systemd-udev-trigger.service # for Centos 7


[問題] how to run 32bits application on 64bits OS You're on a 64-bit system, and don't have 32-bit library support installed
      /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
[解決] sudo yum install glibc.i686
      or, if that's not available on Centos-6,
      sudo yum install glibc.i386

[問題] Centos6 命令行實現自動補全
[解決] http://www.2cto.com/os/201504/394468.html

[問題] CentOS7 安裝用於科學研究
[解決] http://seisman.info/linux-environment-for-seismology-research.html

[問題] centos 常用到快捷鍵操作列表
[解決] http://www.centoscn.com/CentOS/2013/0223/162.html

[問題] centos 安裝virtualbox到方法?
[解決] http://blog.csdn.net/todd911/article/details/8198458

[問題] 安裝桌面環境,##此法未驗證
[解決]
1. 使用命令 runlevel 查看當前的運行級別 ,如圖所示
2. 使用命令 yum grouplist | more  查看是否安裝了桌面環境的組件,如圖所示
3. yum groupinstall -y   "Desktop"   "Desktop Platform"   "Desktop Platform Development"  "Fonts"  "General Purpose Desktop"  "Graphical Administration Tools"  "Graphics Creation Tools"  "Input Methods"  "X Window System"  "Chinese Support [zh]" "Internet Browser"
4. 安裝好了桌面環境的軟件,然後再修改一下系統的啓動級別 爲 5

  編輯/etc/inittab文件,修改啓級別爲5,如下圖,然後重新啓動就可以進入桌面環境了。因爲我這是遠程環境的,只是運用了命令行,可以使用VNC進行桌面環境的遠程。
5. 重啓的過程中,設置一下桌面環境的幾個參數就可以正常進入登陸界面了,謝謝。

[問題] 從移動硬盤安裝CentOS 6,此法測試成功,用的是網絡安裝版本到iso文件
[解決] http://wiki.centos.org/HowTos/InstallFromUSBkey
http://wenku.baidu.com/link?url=R-JUqabn9iyvHVTNbV2R-2ggqWnfjShDAxLRy0uSXpmaoqyrbiwj-tU72olzWtvDINr-D2Czzs8OY9IOe9U4O2t0rDQqnNRVN-G2gGRc8KG

[問題] 分區設定,以64G爲單位分區
[解決] http://blog.sina.com.cn/s/blog_54f30ece0101mkul.html

[問題] 網絡配置
[解決] ip地址:194.169.3.47  
       廣播地址:194.169.3.255  
       網絡掩碼:255.255.255.0
       DNS地址:223.5.5.5
       Search domain: 194.169.3.1 ##注意, 這個ip地址可以解析內網到DNS,比如rdm.ingenic.cn

[問題] 通過移動硬盤安裝 CentOS 系統
[解決]
一、下載七個 CentOS-5.6-i386-bin-***.iso 文件到移動硬盤 fat32 格式相應分區根目錄,並將第一個解壓,取其 isolinux 放置在這個根目錄。
(DVD的鏡像文件大於4G,fat32 格式磁盤不接受。)
二、下載grub文件夾到移動硬盤,將其中的 grldr 和 menu.lst 複製到移動硬盤同上分區根目錄。
三、修改menu.lst 文件,加上:
title CentOS Install
kernel /isolinux/vmlinuz
initrd /isolinux/initrd.img
boot
四、運行bootice.exe(這是個不錯的工具)將移動硬盤的主、分區引導記錄都設置爲 grub4dos*** 。
五、設置 bios 移動硬盤啓動。
六、開機進入 Grub 界面,選擇 CentOS Install 安裝。
安裝過程中注意grub要選擇安裝在固定硬盤上,有相應選項。

[問題] centos7 使用cloner.sh編譯cling導致的cpu過熱異常
[解決]
[ingenic@localhost linux-amlogic]$ sudo mcelog
Hardware event. This is not a software error.
MCE 0
CPU 2 THERMAL EVENT TSC 1601cd5875c68
TIME 1456207892 Tue Feb 23 14:11:32 2016
Processor 2 heated above trip temperature. Throttling enabled.
Please check your system cooling. Performance will be impacted
STATUS 880003c3 MCGSTATUS 0
MCGCAP c09 APICID 4 SOCKETID 0
CPUID Vendor Intel Family 6 Model 60
Hardware event. This is not a software error.
MCE 1
CPU 6 THERMAL EVENT TSC 1601cd587e5de
TIME 1456207892 Tue Feb 23 14:11:32 2016
Processor 6 heated above trip temperature. Throttling enabled.
Please check your system cooling. Performance will be impacted
STATUS 880003c3 MCGSTATUS 0
MCGCAP c09 APICID 5 SOCKETID 0
CPUID Vendor Intel Family 6 Model 60
Hardware event. This is not a software error.
MCE 2
CPU 2 THERMAL EVENT TSC 1601cd5be3576
TIME 1456207892 Tue Feb 23 14:11:32 2016
Processor 2 below trip temperature. Throttling disabled
STATUS 88010282 MCGSTATUS 0
MCGCAP c09 APICID 4 SOCKETID 0
CPUID Vendor Intel Family 6 Model 60
Hardware event. This is not a software error.
MCE 3
CPU 6 THERMAL EVENT TSC 1601cd5bebd75
TIME 1456207892 Tue Feb 23 14:11:32 2016
Processor 6 below trip temperature. Throttling disabled
STATUS 88010282 MCGSTATUS 0
MCGCAP c09 APICID 5 SOCKETID 0
CPUID Vendor Intel Family 6 Model 60

 

[問題] CENTOS 6.3上安裝kingsoft-office-9.1.0.4032-0.1.a10.i686.rpm

[解答]

1. 下載WPS的rpm安裝包

kingsoft-office-9.1.0.4032-0.1.a10.i686.rpm

2. 無依賴安裝

rpm -ivh kingsoft-office-9.1.0.4032-0.1.a10.i686.rpm --nodeps

注意以前安裝過WPS的, 要先卸載掉.

卸載命令: rpm -e xxxxx.rpm

3. 添加依賴庫文件到目錄/opt/kingsoft/wps-office/office6/

不建議將庫文件放到/usr/lib或者/lib裏面, 那樣做可能影響其它軟件的正常運行.

WPS依賴的庫, 放在它自己的庫目錄裏, 這樣就不會影響外面的世界了, 嘿嘿.

依賴的庫文件手工複製到這裏, 缺啥複製啥.

/opt/kingsoft/wps-office/office6/

 

[問題] centos7 install WPS

[解決] 參考:http://seisman.info/wps-office-for-centos7.html

http://kdl.cc.ksosoft.com/wps-community/download/a16/wps-office-9.1.0.4909-1.a16p1.i686.rpm

sudo yum install http://kdl.cc.ksosoft.com/wps-community/download/a15/wps-office-fonts-1.0-1.noarch.rpm

 

CentOS 6.5 32位下搭建android2.3.7開發環境

[問題] ld/core/base_rules.mk:162: *** frameworks/base/elemnt/JniWifi: MODULE.TARGET.SHARED_LIBRARIES.libelewifi_jni already defined by frameworks/base/towercraneserver/JniWifi. Stop.

[解答] mv ./frameworks/base/towercraneserver/JniWifi ./frameworks/base/towercraneserver/JniWifi_backup

mv ./frameworks/base/towercraneserver/JniWifi_backup/ ../

mv ./frameworks/base/towercraneserver/JniPhone/ ../

 

 

[問題] (unknown): error 3: Added class PhoneVoicePlayer to package android.media

[解答] make update-api

 

 

[問題] host C: adb <= system/core/adb/fdevent.c

host Executable: adb (out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb)

/usr/bin/ld: cannot find -lncurses

[解答] yum install ncurses-devel

 

 

[問題] host Executable: sqlite3 (out/host/linux-x86/obj/EXECUTABLES/sqlite3_intermediates/sqlite3)

/usr/bin/ld: cannot find -lhistory

collect2: ld returned 1 exit status

make: *** [out/host/linux-x86/obj/EXECUTABLES/sqlite3_intermediates/sqlite3] Error 1

[解答] yum install readline-devel

 

 

[問題] target thumb C++: myeletest <= frameworks/base/elemnt/mytest/Mytest.cpp

frameworks/base/elemnt/mytest/Mytest.cpp: In static member function 'static const android::sp<android::IEleMonitorService>& android::MyEleTest::getMyTestService()':

frameworks/base/elemnt/mytest/Mytest.cpp:73: error: cannot allocate an object of abstract type 'android::MyEleTest::EleMonitorClient'

frameworks/base/elemnt/mytest/Mytest.h:44: note: because the following virtual functions are pure within 'android::MyEleTest::EleMonitorClient':

frameworks/base/elemnt/mytest/../../elemnt/libelecbinder/IEleMonitorClient.h:22: note:virtual void android::IEleMonitorClient::EleSendSmsReq(const char*, const char*)

frameworks/base/elemnt/mytest/../../elemnt/libelecbinder/IEleMonitorClient.h:23: note:virtual void android::IEleMonitorClient::ElePhoneCallReq(const char*)

frameworks/base/elemnt/mytest/../../elemnt/libelecbinder/IEleMonitorClient.h:24: note:virtual void android::IEleMonitorClient::ElePlayPacifyAudio(int, const char*)

frameworks/base/elemnt/mytest/Mytest.cpp: In member function 'void android::MyEleTest::start()':

frameworks/base/elemnt/mytest/Mytest.cpp:116: error: 'class android::IEleMonitorService' has no member named 'start'

make: *** [out/target/product/generic/obj/EXECUTABLES/myeletest_intermediates/Mytest.o] Error 1

[解答] using /* */ comment which caused compile bug #doesn't work

mv frameworks/base/elemnt/mytest/ ../

 

 

[問題] Lex: libedify <= bootable/recovery/edify/lexer.l

/bin/bash: flex: command not found

[解答] yum install flex.i686

 

 

[問題] sh: gperf: command not found

[解答] yum install gperf

 

 

[問題] ./system/core/include/arch/linux-arm/AndroidConfig.h:114:1: warning: this is the location of the previous definition

external/rp-pppoe-3.10/src/if.c:34:26: error: net/ethernet.h: No such file or directory

make: *** [out/target/product/generic/obj/EXECUTABLES/pppoe_intermediates/src/if.o] Error 1

[解答] vi external/rp-pppoe-3.10/src/config.h

#define HAVE_NET_ETHERNET_H 1 ---> /* #define HAVE_NET_ETHERNET_H 1 */

 

 

[問題] target thumb C: libaltustd-ril <= hardware/ril/altustd-ril/icc.c

make: *** No rule to make target `out/target/product/generic/obj/lib/libasound.so', needed by `out/target/product/generic/obj/SHARED_LIBRARIES/libaltustd-ril_intermediates/LINKED/libaltustd-ril.so'. Stop.

[解答] cp ./out/target/product/sam9g45/system/lib/libasound.so out/target/product/generic/obj/lib

 

 

<RESULT>Target system fs image: out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.img

Install system fs image: out/target/product/generic/system.img

Target ram disk: out/target/product/generic/ramdisk.img

Target userdata fs image: out/target/product/generic/userdata.img

Installed file list: out/target/product/generic/installed-files.txt

 

[問題] The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host mirrors.aliyun.com'.

 

[解決] 新的pip要求源必須是https, mirrors.aliyun.com is not https

cat ~/.pip/pip.conf

[global]

index-url = http://mirrors.aliyun.com/pypi/simple/

trusted-host=mirrors.aliyun.com ## add this line fix https warning

 

[install]

trusted-host=mirrors.aliyun.com

 

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