我需要在Ubuntu 16.04.4机器上安装CBLAS。已在CBLAS的Makefile.in
文件中设置以下值:
SHELL = /bin/sh
PLAT = LINUX
BLLIB = /home/ubuntu/BLAS-3.8.0/blas_LINUX.a
CBLIB = /home/ubuntu/CBLAS/lib/cblas_LINUX.a
CC = gcc
FC = gfortran
LOADER = $(FC)
CFLAGS = -O3 -DADD_ -fPIC
FFLAGS = -O3 -fPIC
ARCH = gcc
ARCHFLAGS = -shared -o
RANLIB = ranlib
但是,在运行make
命令时,我遇到以下错误:
ranlib: /home/ubuntu/CBLAS/lib/cblas_LINUX.a: File format not recognized
以下是堆栈跟踪:
有人可以建议如何解决这个问题吗?
答案 0 :(得分:0)
CBLAS共享库:sudo apt install libatlas3-base libatlas-base-dev
libatlas3-base
提供了
/usr/lib/atlas-base/atlas/libblas.so.3
/usr/lib/atlas-base/atlas/libblas.so.3.0
/usr/lib/atlas-base/atlas/liblapack.so.3
/usr/lib/atlas-base/atlas/liblapack.so.3.0
/usr/lib/atlas-base/libatlas.so.3
/usr/lib/atlas-base/libatlas.so.3.0
/usr/lib/atlas-base/libcblas.so.3
/usr/lib/atlas-base/libcblas.so.3.0
/usr/lib/atlas-base/libf77blas.so.3
/usr/lib/atlas-base/libf77blas.so.3.0
/usr/lib/atlas-base/liblapack_atlas.so.3
/usr/lib/atlas-base/liblapack_atlas.so.3.0
/usr/lib/libatlas.so.3
/usr/lib/libcblas.so.3 ← ←
/usr/lib/libf77blas.so.3
/usr/lib/liblapack_atlas.so.3
libatlas-base-dev
提供了
/usr/lib/atlas-base/atlas/libblas.a
/usr/lib/atlas-base/atlas/libblas.so
/usr/lib/atlas-base/atlas/liblapack.a
/usr/lib/atlas-base/atlas/liblapack.so
/usr/lib/atlas-base/libatlas.a
/usr/lib/atlas-base/libatlas.so
/usr/lib/atlas-base/libcblas.a
/usr/lib/atlas-base/libcblas.so
/usr/lib/atlas-base/libf77blas.a
/usr/lib/atlas-base/libf77blas.so
/usr/lib/atlas-base/liblapack_atlas.a
/usr/lib/atlas-base/liblapack_atlas.so
/usr/lib/libatlas.a
/usr/lib/libatlas.so
/usr/lib/libcblas.a
/usr/lib/libcblas.so ← ←
/usr/lib/libf77blas.a
/usr/lib/libf77blas.so
/usr/lib/liblapack_atlas.a
/usr/lib/liblapack_atlas.so