简体   繁体   English

将 gdcm 安装到 CentOS 7

[英]Installing gdcm to CentOS 7

I am a beginner about compiling from source, so I need your help!我是从源代码编译的初学者,所以我需要你的帮助!

As I need to execute gdcmdump on CentOS 7, I am trying to install gdcm.由于我需要在 CentOS 7 上执行 gdcmdump,我正在尝试安装 gdcm。

First I tried to首先我试着

git clone --branch release git://git.code.sf.net/p/gdcm/gdcm

but it failed.但它失败了。 So I cloned the release by所以我克隆了这个版本

git clone https://git.code.sf.net/p/gdcm/gdcm gdcm-gdcm

and did并且做了

mkdir gdcmbin cd gdcmbin cmake ../gdcm make make install

without any errors.没有任何错误。

But somehow I cannot execute gdcmdump.但不知何故我无法执行gdcmdump。 ("command not found" shown) (显示“未找到命令”)

I also tried another option (I'm not sure it is actually right):我还尝试了另一种选择(我不确定它是否真的正确):

I downloaded GDCM-3.0.5-Linux-x86_64.tar.gz from https://github.com/malaterre/GDCM/releases/tag/v3.0.5 and unzipped it.我从https://github.com/malaterre/GDCM/releases/tag/v3.0.5下载了 GDCM-3.0.5-Linux-x86_64.tar.gz 并解压。

I found "bin", "include", "lib", "share" directories in it.我在其中找到了“bin”、“include”、“lib”、“share”目录。 But I have no idea how to handle these...但我不知道如何处理这些......

Any comments are appreciated!任何意见表示赞赏!

make creates the executable locally, so if it's not in your $PATH , you'll have to provide a path to it. make在本地创建可执行文件,因此如果它不在您的$PATH ,您必须提供它的路径。 You could instead use make install (requires root permissions) to install it for all users.您可以改为使用make install (需要 root 权限)为所有用户安装它。

.. somehow I cannot execute gdcmdump. ..不知何故我无法执行gdcmdump。 "command not found" “找不到相关命令”

Plain cmake .. will build "gdcm*Tests" only.普通cmake ..只会构建“gdcm*Tests”。 See INSTALL.txt : GDCM_BUILD_APPLICATIONS: turn it on if you want the build gdcm applications ( gdcmdump , gdcmconv, gdcminfo ...) .请参阅 INSTALL.txt : GDCM_BUILD_APPLICATIONS: 如果您想要构建 gdcm 应用程序( gdcmdump 、 gdcmconv、 gdcminfo ...),请将其打开

GDCM-3.0.5.tar.gz https://codeload.github.com/malaterre/GDCM/tar.gz/v3.0.5 GDCM-3.0.5.tar.gz https://codeload.github.com/malaterre/GDCM/tar.gz/v3.0.5

tar xvf GDCM-3.0.5.tar.gz
cd GDCM-3.0.5/ && mkdir build && cd build/
cmake -DGDCM_BUILD_APPLICATIONS:BOOL=ON ..
make

The executable's gdcmanon, gdcmdiff, gdcmgendir, gdcminfo, gdcmraw, gdcmscu, gdcmxml, gdcmconv, gdcmdump, gdcmimg, gdcmpap3, gdcmscanner, gdcmtar are created in bin/可执行文件的gdcmanon, gdcmdiff, gdcmgendir, gdcminfo, gdcmraw, gdcmscu, gdcmxml, gdcmconv, gdcmdump, gdcmimg, gdcmpap3, gdcmscanner, gdcmtarbin/中创建


About "GDCM-3.0.5-Linux-x86_64.tar.gz" : $ cd GDCM-3.0.5-Linux-x86_64/bin/ && export LD_LIBRARY_PATH=../lib/ && ./gdcmdump .... No issues.关于“GDCM-3.0.5-Linux-x86_64.tar.gz”: $ cd GDCM-3.0.5-Linux-x86_64/bin/ && export LD_LIBRARY_PATH=../lib/ && ./gdcmdump ....没有问题.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM