0

我需要在 Ubuntu 16.04.4 机器上安装 CBLAS。Makefile.in在CBLAS 文件中设置了以下值:

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

以下是堆栈跟踪:

在此处输入图像描述

有人可以建议如何解决这个问题吗?

4

1 回答 1

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
于 2018-04-18T20:40:13.443 回答