关闭

调试中遇到问题的解决方法

1114人阅读 评论(0) 收藏 举报
分类:

1.未使用交叉工具链中的库文件,而是默认使用了ubuntu中系统库文件,导致incompatible错误。

解决方法:定义STAGING_DIR环境变量。

export STAGING_DIR=/opt/toolchain_mspdc2k/bin:$STAGING_DIR (/opt/toolchain_mspdc2k/bin为交叉工具链bin所在位置

2.安装ssh server。出现安装包所依赖的已安装的库版本过高,需要手动地降低已安装的库版本。错误描述如下

apt-get install openssh-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:


The following packages have unmet dependencies:
  openssh-server: Depends: openssh-client (= 1:5.3p1-3ubuntu3) but 1:5.3p1-3ubuntu7 is to be installed
E: Broken packages

解决方法:

root@iefswang-desktop:/home/iefswang/wireless/upx-3.91-src/src#apt-cache showpkg ssh-client
Package: ssh-client
Versions: 


Reverse Depends: 
  avahi-ui-utils,ssh-client
  git-core,ssh-client
  devscripts,ssh-client
  backuppc,ssh-client
  ckermit,ssh-client
  unison-gtk,ssh-client
  unison,ssh-client
  sshpass,ssh-client
  lxsession,ssh-client
  ltp-network-test,ssh-client
  libpam-ssh,ssh-client
  libnxcl1,ssh-client
  libnet-ssh-perl,ssh-client
  libnet-sftp-foreign-perl,ssh-client
  libnet-scp-perl,ssh-client
  lam-runtime,ssh-client
  keychain,ssh-client
  gstm,ssh-client
  grabcd-rip,ssh-client
  gabedit,ssh-client
  duply,ssh-client
  avahi-ui-utils,ssh-client
  autossh,ssh-client
  git-core,ssh-client
  devscripts,ssh-client
  backuppc,ssh-client
Dependencies: 
Provides: 
Reverse Provides: 
openssh-client 1:5.3p1-3ubuntu7
openssh-client 1:5.3p1-3ubuntu3

root@iefswang-desktop:/home/iefswang/wireless/upx-3.91-src/src# aptitude install openssh-client=1:5.3p1-3ubuntu3

根据apt-cache得知已安装的openssh-client的版本号为1:5.3p1-3ubuntu7,需要降低为1:5.3p1-3ubuntu3。命令:

aptitude install openssh-client=1:5.3p1-3ubuntu3

或者

apt-get install openssh-client=1:5.3p1-3ubuntu3

3、crosstool-ng 1.9.3 编译交叉编译器

注意:将C compiler--additional language :[*]java 中的选项取消。

1)当提取duma2_5_15时报错:

Build failed in step 'Extracting and patching toolchain components' 

查看build.log可知,解压duma2_5_15.tar.gz时出错。

tar zxvf duma2_5_15.tar.gz 执行后出错。

file duma2_5_15.tar.gz   可以看到duma2_5_15.tar.gz是HTML文件

解决办法:将tarball目录下的源码文件duma2_5_15.tar.gz、strace-4.5.19.tar.bz2和expat-2.0.2.tar.gz(也不是压缩格式的文件),需要手动下载这些源码文件。


 2)checking for C compiler default output file name... configure: error: C compiler cannot create executables

Build failed in step 'Installing static core C compiler'

网上给了几种解决方法:

(1)  apt-get install libc6-dev gcc g++


(2) 其他网友给的答案是(我的配置已经取消了链接成静态库,这里没碰到这个问题。写在这里,留作以后参考)

[*] Link libstdc++ statically into the gcc binary

可以看到GCC在编译时被静态链接了,也就是没有生成libstdc++.so,所以导致libstdc++连接不到,因此去掉该选项,再次编译。

试了下,没管用。

可能正如http://blog.csdn.net/chen_zhongming/article/details/6680596的作者所说,是我的环境没有安装好或者是源码包没下全,所以将这篇文章中提到的包下载更新:

apt-get install aria2 curl 

ap-get install libglibc*

apt-get install libncurses5*


0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:234002次
    • 积分:3038
    • 等级:
    • 排名:第11476名
    • 原创:60篇
    • 转载:101篇
    • 译文:0篇
    • 评论:18条
    最新评论