我需要通过脑电信号工作,并尝试使用来自 physionet 的 WFDB网站来自此指令,因此根据其 readme.MD 文件我尝试执行以下操作:
$ sudo apt-get install gcc libcurl4-openssl-dev perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc is already the newest version (4:7.4.0-1ubuntu2.3).
libcurl4-openssl-dev is already the newest version (7.58.0-2ubuntu3.8).
perl is already the newest version (5.26.1-6ubuntu0.3).
0 upgraded, 0 newly installed, 0 to remove and 99 not upgraded.
当我尝试时sudo make
,我得到了这个输出:
$ sudo ./configure
Checking the operating system type ...
Configuring the WFDB software package for Linux-64.
Checking the echo command ...
Looking for the C compiler ... gcc
Looking for the command to strip debugging metadata ... strip
The WFDB software will be installed in '/usr/local'.
The manual pages will be installed in '/usr/local/share/man'.
Looking for libcurl ... found
The WFDB software will be compiled with NETFILES access
using libcurl.
Creating Makefile in lib ...
Creating Makefile in app ...
Creating Makefile in checkpkg ...
Creating Makefile in convert ...
Creating Makefile in data ...
Creating Makefile in doc ...
Creating Makefile in doc/wag-src ...
Creating Makefile in doc/wpg-src ...
Creating Makefile in doc/wug-src ...
Creating Makefile in examples ...
Creating Makefile in fortran ...
Creating Makefile in psd ...
Creating Makefile in wave ...
Creating Makefile in waverc ...
Creating Makefile in xml ...
Creating Makefile in . ...
rm conf/site.def conf/site-slib.def
IMPORTANT: You have chosen to build a dynamic (shared) WFDB library in
a directory, /usr/local/lib, that is not normally searched for such
libraries. In order to use the applications that will be compiled
with this library, it may be necessary to add this directory to your
LD_LIBRARY_PATH. If your shell is csh or a variant, do this by
typing:
setenv LD_LIBRARY_PATH /usr/local/lib
Otherwise, do this by typing:
LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH
Summary:
wfdb-10.6.2-Linux-64 is now ready to be compiled using 'gcc'.
The WFDB library will be compiled as a dynamic library with NETFILES
access via libcurl, and it will be installed in '/usr/local/lib'.
The WFDB library .h files will be installed in '/usr/local/include/wfdb'.
The WFDB applications will be linked to dynamic system libraries, and
they will be installed in '/usr/local/bin'.
WAVE will not be compiled.
Manual pages will be installed in subdirectories of '/usr/local/share/man'.
Sample data files will be installed in '/usr/local/database', which
will be included in the default WFDB path.
If you need to compile a different WFDB library type, or install into different
directories, rerun this script with its "-i" (interactive) option:
./configure -i
Other options can be viewed by rerunning this script with its "-h" option:
./configure -h
WFDB software configuration is complete.
Now run 'make' to compile and test, followed by 'make install' to recompile
and install the software, man pages, and example data. Finally, run
'make check' to verify that the installation is complete and successful.
so@so-notebook:/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2$ sudo make
make WFDBROOT=`pwd`/build LIBDIR=`pwd`/build/lib install
make[1]: Entering directory '/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2'
cd lib; make clean; make install
make[2]: Entering directory '/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2/lib'
rm -f wfdbinit.o annot.o signal.o calib.o wfdbio.o libwfdb.* *.dll *~
make[2]: Leaving directory '/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2/lib'
make[2]: Entering directory '/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2/lib'
make clean # force recompilation since config may have changed
make[3]: Entering directory '/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2/lib'
rm -f wfdbinit.o annot.o signal.o calib.o wfdbio.o libwfdb.* *.dll *~
make[3]: Leaving directory '/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2/lib'
make all
make[3]: Entering directory '/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2/lib'
make setup
make[4]: Entering directory '/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2/lib'
sed "s+DBDIR+/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2/build/database+" <wfdblib.h0 >wfdblib.h
make[4]: Leaving directory '/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2/lib'
make wfdbinit.o annot.o signal.o calib.o wfdbio.o
make[4]: Entering directory '/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2/lib'
gcc -Wno-implicit -Wformat -fpic -g -O -DWFDB_MAJOR=10 -DWFDB_MINOR=6 -DWFDB_RELEASE=2 `curl-config --cflags` -I/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2/build/include -c -o wfdbinit.o wfdbinit.c
/bin/sh: 1: Syntax error: Unterminated quoted string
<builtin>: recipe for target 'wfdbinit.o' failed
make[4]: *** [wfdbinit.o] Error 2
make[4]: Leaving directory '/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2/lib'
Makefile:224: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2/lib'
Makefile:230: recipe for target 'install' failed
make[2]: *** [install] Error 2
make[2]: Leaving directory '/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2/lib'
Makefile:268: recipe for target 'install' failed
make[1]: *** [install] Error 2
make[1]: Leaving directory '/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2'
Makefile:263: recipe for target 'all' failed
make: *** [all] Error 2
一些更多信息基于这:
安装 gcc、libcurl 和 perl(需要 root 权限)。使用以下命令检查它们是否已安装
gcc --version curl-config --version perl --version
如果这些命令有效,请跳至下一步。否则,在 Fedora 和其他基于 RPM 的 GNU/Linux 发行版中,命令
$ gcc --version
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
so@so-notebook:/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2$ curl-config --version
libcurl 7.58.0
so@so-notebook:/media/so/ACAC8B5FAC8B2346/Elasa/Softwares/Linux's/AI/Octave/Biomed/wfdb/wfdb-10.6.2$ perl --version
This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-gnu-thread-multi
(with 67 registered patches, see perl -V for more detail)
Copyright 1987-2017, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
所以在这里询问这个问题。
谢谢。
答案1
我建议在你的主目录中编译代码:
cd ~/Downloads
wget https://physionet.org/physiotools/wfdb.tar.gz
tar -xf wfdb.tar.gz
cd wfdb-10.6.2
./configure
make
sudo make install
因为它会/usr/local
顺便安装。