2016-12-10 36 views
0

我對linux相當陌生,試圖讓一些代碼運行。在嘗試了幾天沒有成功之後,我希望有人能夠幫助我。我的Linux版本是設置配置文件和運行代碼的問題

說明:Ubuntu的LTS 16.04.1發行:16.04代號:xenial 的代碼這裏找到:https://bitbucket.org/dsign/gecmi/wiki/Home

我的問題在於修改配置文件:site_config.py從該開發商說,我應該:

檢查此文件並編輯它,使其與您的編譯環境,要編譯的目標以及您想要在何處安裝它們相匹配。 首先,我試圖通過安裝增壓,該局,scons的和numpy的/ SciPy的庫apt-get的

sudo apt-get install libboost-dev 
sudo apt-get install scons 
sudo apt-get install python-scipy 
sudo apt-get install python-numpy 
sudo apt-get install libtbb-dev 

我不知道如果這些都是正確的版本,但是這就是研究了一下後,我能找到。

下一步是調整配置文件中的條目,但是我發現它非常困難(實際上我沒有太多線索)找出WHERE所有這些目錄是在安裝上述庫之後是或如何適應分別此配置文件:

# Use 'release' for speed, 'debug' for debugging. 
COMPILE_MODE='release' 
# Use one or both of the following words: 'standalone' for 
# building the standalone executable, 'python' for building 
# the python module 
COMPILE_TARGETS='standalone python' 
# Where the boost library is installed. I expect an 'include' 
# and a 'lib' dir below. 
BOOST_ROOT='/opt/boost_1_47_0/' 
# The prefix of the python installation. This is used for deducing 
# include directories and lib path of python 
PYTHON_PREFIX="/usr/" 
# The python's version. Used for deducing include directories and 
# library name of python. 
PYTHON_VERSION ="2.7" 
# Where the Intel threading building blocks is installed. I expect 
# and 'include' and a 'lib' directory below this one. 
TBB_PREFIX="/home/alcides/programming/projects/sci_python/prx" 
# The executable for the c++ compiler to use. 
COMPILER_NAME="g++-4.6" 
# The place where numpy is installed. I expect the directories 
# 'core/include' and 'numarray/include' below. 
NUMPY_PREFIX="/usr/local/lib/python2.7/dist-packages/numpy/" 

# Where you sould like the standalone program to be installed 
GECMI_PROGRAM_INSTALL_AT='/usr/local/bin' 
# Where you would like the shared library to be installed. This 
# library is used by both the python module and the standalone 
# program. 
GECMI_LIB_INSTALL_AT='/usr/local/lib' 
# Where would you like to have the module installed, for the 
# target 'InstallPythonModule'. A dll file called gecmi.{dllext} 
# is installed there. 
PYTHON_MODULE_INSTALL_AT='/usr/lib/python2.7/dist-packages' 

作者點的尖端修改LD_LIBRARY_PATH變量,但並沒有幫助我很多之一:

你可以得到的那種錯誤而載入的消息共享庫,如果依賴關係沒有正確安裝。在這種情況下,您可能想要找到命令locate和環境變量LD_LIBRARY_PATH,或者您選擇的操作系統中的等價物。 我試圖使用whereis並找到,但不知道這是否有效。例如,當我使用whereis boost或locate boost時,我發現很多目錄,但沒有像boost/include或boost/lib這樣的目錄,這似乎是配置文件所期望的。對於numpy,沒有numarray/include文件夾asf。

所以基本上我想知道一個Linux超級用戶將如何找到所有必需的路徑和目錄,並找出如何得到這個代碼運行(或者,如果你們中的一些可以運行的代碼)。我也很感謝有關如何更加熟悉解決這些問題的更多信息/教程/建議。

謝謝!

回答