linux 下uci纯净版 编译

搭建环境:在我的电脑上的64位虚拟机下
Compiling UCI as stand alone

一、编译uci库
cd ~

cd /wyy/work/ft100/GNS/uci_gns/uci


cd ~/uci

cmake -DBUILD_LUA=off

sudo make install

或make install DESTDIR=$HOME(为了能够安装到标准路径下,方便其他程序也可以调用uci库,此处选择sudo mak install安装到根目录下)

此时会提示出错,

 
二、编译ubox库
进入

/wyy/work/ft100/GNS/uci_gns/libubox


cd ~/libubox

cmake -DBUILD_LUA=off

sudo make install

 

返回uci目录继续安装

cd ~/uci

sudo make install

三、处理错误
此时执行uci -v命令会提示
uci: error while loading shared libraries: libuci.so: cannot open shared object file: No such file or directory
解决办法:用软连接连接上
linux@ubuntu:/usr/local/lib$ ldd /usr/local/bin/uci

         linux-gate.so.1 =>  (0xb779f000)

         libuci.so => not found

         libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb75e7000)

         /lib/ld-linux.so.2 (0xb77a0000)
 sudo ln -s /usr/local/lib/libuci.so /usr/lib/libuci.so

linux@ubuntu:/usr/local/lib$ ldd /usr/local/bin/uci

         linux-gate.so.1 =>  (0xb7776000)

         libuci.so => /usr/lib/libuci.so (0xb7757000)

         libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb75b2000)

         libubox.so => /usr/lib/libubox.so (0xb75a7000)

         /lib/ld-linux.so.2 (0xb7777000)

         librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb759e000)

         libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7583000)

linux@ubuntu:/usr/local/lib$ ldd /usr/local/bin/uci

更新ldconfig

sudo /sbin/ldconfig -v

OK

上一篇:[4G&5G专题-38]:物理层-上行控制信道PUCCH与上行控制信息UCI


下一篇:DHCPv6原理与配置