CP-ABE安装方法

1、安装m4

sudo apt-get install m4  //这样比较方便……

或者

http://www.gnu.org/software/m4/ 

http://ftp.gnu.org/gnu/m4/ 下载压缩包

但我暂时不会安……

checking for suitable m4... configure: error: No usable m4 in $PATH or /usr/5bin (see config.log for reasons).


2、安装gmp

http://gmplib.org/

./configure
make
make check

sudo make install


3、安装pbc

http://crypto.stanford.edu/pbc/download.html

flex not found

sudo apt-get install flex

bison not found

sudo apt-get install bison

-----------------------------------------------------

./configure
make
sudo make install


4、安装cpabe toolkit

http://hms.isi.jhu.edu/acsc/cpabe/ or http://acsc.cs.utexas.edu/cpabe/

先安装libbswabe

./configure

make

make install

----------------------------------------

configure: error: please install the OpenSSL crypto library, libcrypto.

sudo apt-get install libssl-dev

-------------------------------------------

checking for GLIB - version >= 2.0.0... no

*** Could not run GLIB test program

sudo apt-get install libgtk2.0-dev 还可尝试sudo apt-get install libglib2.0-dev

也可以通过源码来安装

www.gtk.org/download/linux.php
configure: error: Package requirements (libffi >= 3.0.0) were not met:
No package 'libffi' found

安装libffi,sourceware.org/libffi/

----------------------

/usr/bin/ld: /usr/local/lib/libpbc.so: undefined reference to symbol '__gmpz_init'
/usr/bin/ld: note: '__gmpz_init' is defined in DSO /usr/local/lib/libgmp.so so try adding it to the linker command line

修改Makefile,LDFLAGS最后加入-lgmp

-----------------------

64位系统请注意!!!

policy_lang.y: In function ‘eq_policy’:
policy_lang.y:212:4: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=]
    (g_strdup_printf("%s_flexint_%llu", attr, n->value));
32位%llu,64位%lu就行

-----------------------

policy_lang.y: In function ‘yyparse’:
policy_lang.y:67:38: error: expected ‘;’ before ‘}’ token
 result: policy { final_policy = $1 }
确实需要一个;

-----------------------

make

sudo make install

---------------------

make install 也有问题!!!

if which help2man 2> /dev/null; then \
       help2man --section=1 --source="SRI International" --no-info \
                -I cpabe-setup.more-man -o cpabe-setup.1 ./cpabe-setup; \
    fi
......
./install-sh: cpabe-setup.1 does not exist.
./install-sh: cpabe-enc.1 does not exist.
./install-sh: cpabe-keygen.1 does not exist.
./install-sh: cpabe-dec.1 does not exist.
make: *** [install] Error 1

安装help2man

sudo apt-get install help2man

--------------

大功告成。

部分参考http://blog.sina.com.cn/s/blog_7b83134b0101ba1o.html

------------------------

目前这个应该是最完善的了吧!!!

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值