我想要安装这个文件:选项在我的 Ubuntu 13.04 中。但我收到以下错误消息:
running install
running build
running build_py
running build_ext
building 'base' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c C/base.c -o build/temp.linux-x86_64-2.7/C/base.o
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c C/dense.c -o build/temp.linux-x86_64-2.7/C/dense.o
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c C/sparse.c -o build/temp.linux-x86_64-2.7/C/sparse.o
C/sparse.c: In function ‘sparse_concat’:
C/sparse.c:368:28: warning: variable ‘blk_ncols’ set but not used [-Wunused-but-set-variable]
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/C/base.o build/temp.linux-x86_64-2.7/C/dense.o build/temp.linux-x86_64-2.7/C/sparse.o -lm -llapack -lblas -o build/lib.linux-x86_64-2.7/cvxopt/base.so
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
任何帮助或建议都将不胜感激!
答案1
因此您没有lapack
和blas
库。您应该能够像
sudo apt-get install libblas-dev
sudo apt-get install liblapack-dev
当我尝试编译时,它以与您相同的方式结束,在安装两个库后它成功完成。
答案2
最终对我有用的是安装libncurses-dev
sudo apt-get -y install libncurses-dev
答案3
您需gcc
要这样做。它位于同名的包中。