ubuntu 上安装 oprofile

1. wget http://prdownloads.sourceforge.net/oprofile/oprofile-0.9.6.tar.gz

2. tar -zxf oprofile-0.9.6.tar.gz

3. ./configure
checking for poptGetContext in -lpopt... no
configure: error: popt library not found

Required libraries 
These libraries are required : popt, bfd, liberty (debian users: libiberty is provided in binutils-dev package), dl, plus the standard C++ libraries. 
                

4. because lack of popt library, we should install it first.
search the library popt: apt-cache search popt
chuanchun@chuanchun-laptop:~/Documents/software/oprofile/oprofile-0.9.6$ apt-cache search popt
libpopt-dev - lib for parsing cmdline parameters - development files
libpopt0 - lib for parsing cmdline parameters

5. install the library: 
chuanchun@chuanchun-laptop:~/Documents/software/oprofile/oprofile-0.9.6$ sudo apt-get install libpopt-dev

6. ./configure again
checking for cplus_demangle in -liberty... no
configure: error: liberty library not found
chuanchun@chuanchun-laptop:~/Documents/software/oprofile/oprofile-0.9.6$ sudo apt-get install binutils-dev

7. ./configure
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
doc/xsl/catalog.xml is unchanged
Warning: a working Qt not found; no GUI will be built
Warning: The user account 'oprofile:oprofile' does not exist on the system.
         To profile JITed code, this special user account must exist.
         Please ask your system administrator to add the following user and group:
             user name : 'oprofile'
             group name: 'oprofile'
         The 'oprofile' group must be the default group for the 'oprofile' user.

8.
chuanchun@chuanchun-laptop:~/Documents/software/oprofile/oprofile-0.9.6$ sudo groupadd oprofile
chuanchun@chuanchun-laptop:~/Documents/software/oprofile/oprofile-0.9.6$ sudo useradd -g oprofile oprofile

9. ./configure

10. "make install" rather than "make"
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值