我正在尝试通过ta-indicator
安装gem install ta-indicator
gem,但安装失败并出现以下错误。我错过了什么?
talib.c:2:32: fatal error: ta-lib/ta_abstract.h: No such file or directory
感谢SO的其他帮助,我发现我的路径上需要ta-lb JAR(如下所示)。 JAR位于~/Desktop/_REPOS/misc/stock_analysis/forex/oanda/ruby
:
king@DESKTOP-US7LR7D MINGW64 ~/Desktop/_REPOS/misc/stock_analysis/forex/oanda/ruby (master)
$ env
USERDOMAIN_ROAMINGPROFILE=DESKTOP-US7LR7D
HOMEPATH=\Users\king
MANPATH=/mingw64/share/man:/usr/local/man:/usr/share/man:/usr/man:/share/man:
APPDATA=C:\Users\king\AppData\Roaming
ProgramW6432=C:\Program Files
HOSTNAME=DESKTOP-US7LR7D
SHELL=/usr/bin/bash
TERM=cygwin
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 61 Stepping 4, GenuineIntel
WINDIR=C:\Windows
TMPDIR=/tmp
PUBLIC=C:\Users\Public
USERDOMAIN=DESKTOP-US7LR7D
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
OS=Windows_NT
ALLUSERSPROFILE=C:\ProgramData
TEMP=/tmp
COMMONPROGRAMFILES=C:\Program Files\Common Files
USERNAME=king
PROCESSOR_LEVEL=6
ProgramFiles(x86)=C:\Program Files (x86)
PATH=/c/Users/king/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/king/bin:/c/ProgramData/Oracle/Java/javapath:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/cmd:/mingw64/bin:/usr/bin:/c/Users/king/Desktop/_REPOS/misc/stock_analysis/forex/oanda/ruby:/c/Ruby22-x64/bin:/usr/bin/vendor_perl:/usr/bin/core_perl
EXEPATH=C:\Program Files\Git
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PWD=/c/Users/king/Desktop/_REPOS/misc/stock_analysis/forex/oanda/ruby
SYSTEMDRIVE=C:
LANG=en_US.UTF-8
USERPROFILE=C:\Users\king
PS1=\[\033]0;$TITLEPREFIX:${PWD//[^[:ascii:]]/?}\007\]\n\[\033[32m\]\u@\h \[\033[35m\]$MSYSTEM \[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\]\n$
LOGONSERVER=\\DESKTOP-US7LR7D
CommonProgramW6432=C:\Program Files\Common Files
PROCESSOR_ARCHITECTURE=AMD64
LOCALAPPDATA=C:\Users\king\AppData\Local
!C:=C:\Users\king\Desktop\_REPOS\misc\stock_analysis\forex\oanda\ruby
SSH_ASKPASS=/mingw64/libexec/git-core/git-gui--askpass
ProgramData=C:\ProgramData
SHLVL=1
HOME=/c/Users/king
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW
PLINK_PROTOCOL=ssh
HOMEDRIVE=C:
PROMPT=$P$G
MSYSTEM=MINGW64
COMSPEC=C:\Windows\system32\cmd.exe
TMP=/tmp
SYSTEMROOT=C:\Windows
PRINTER=Microsoft Print to PDF
PROCESSOR_REVISION=3d04
PKG_CONFIG_PATH=/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig
ACLOCAL_PATH=/mingw64/share/aclocal:/usr/share/aclocal
INFOPATH=/usr/local/info:/usr/share/info:/usr/info:/share/info:
PROGRAMFILES=C:\Program Files
DISPLAY=needs-to-be-defined
NUMBER_OF_PROCESSORS=4
SESSIONNAME=Console
COMPUTERNAME=DESKTOP-US7LR7D
_=/usr/bin/env
JAR的位置:
king@DESKTOP-US7LR7D MINGW64 ~/Desktop/_REPOS/misc/stock_analysis/forex/oanda/ruby (master)
$ ls
getTimes.rb indicators_test.rb oanda_api.rb ruby.algorithms.rb ta-lib-0.4.0.jar
独特的问题因为:
答案 0 :(得分:0)
这是一个很酷的技术分析库。无论如何,似乎你缺少C库开发头文件。你可以从TA-Lib site下载。头文件(.h)应该放在/usr/include/ta-lib
目录中。