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.
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. (“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.
I found “bin”, “include”, “lib”, “share” directories in it.
But I have no idea how to handle these…
Any comments are appreciated!
2
Answers
make
creates the executable locally, so if it’s not in your$PATH
, you’ll have to provide a path to it. You could instead usemake install
(requires root permissions) to install it for all users.Plain
cmake ..
will build “gdcm*Tests” only. See INSTALL.txt : GDCM_BUILD_APPLICATIONS: turn it on if you want the build gdcm applications (gdcmdump, gdcmconv, gdcminfo …).GDCM-3.0.5.tar.gz https://codeload.github.com/malaterre/GDCM/tar.gz/v3.0.5
The executable’s
gdcmanon, gdcmdiff, gdcmgendir, gdcminfo, gdcmraw, gdcmscu, gdcmxml, gdcmconv, gdcmdump, gdcmimg, gdcmpap3, gdcmscanner, gdcmtar
are created inbin/
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.