DCMTK under Linux

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
amunaaser
Posts: 40
Joined: Thu, 2020-03-26, 10:29

DCMTK under Linux

#1 Post by amunaaser »

Hi!
Normally, I use DCMTK under Windows, but now I need to use it under Linux:
Operating System: Linux 5.4.233-0504233-generic #202302250651 SMP Sat Feb 25 12:26:27 UTC 2023 x86_64

My question is, which package to use?
https://dicom.offis.de/en/dcmtk/dcmtk-tools/
Do I have to download the the tar file directly in Linux and uncompress it there?

Thanks in advance
Best regards
Nasser Hosseini

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: DCMTK under Linux

#2 Post by Michael Onken »

Hi,

what Linux distribution do you have? Very often, a DCMTK package is provided by the distribution. On Ubuntu, for example, just use

Code: Select all

apt-get install dcmtk
The binary packages for Linux provided by OFFIS may not run on your system, since it requires some effort to create 100% portable Linux binaries (and we did not undertake it).

Best regards,
Michael

amunaaser
Posts: 40
Joined: Thu, 2020-03-26, 10:29

Re: DCMTK under Linux

#3 Post by amunaaser »

Hi!
Thanks Maichael!

This is what I get with "lsb_release -a":
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic

Best regards
Nasser Hosseini

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: DCMTK under Linux

#4 Post by Michael Onken »

Then

Code: Select all

apt-get install dcmtk
should do the trick. Did you try it?

BR Michael

amunaaser
Posts: 40
Joined: Thu, 2020-03-26, 10:29

Re: DCMTK under Linux

#5 Post by amunaaser »

apt-get install dcmtk
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: DCMTK under Linux

#6 Post by Michael Onken »

You need administrator (root) permissions, do:

Code: Select all

sudo apt-get install dcmtk 
or

Code: Select all

su <enter password for root>
apt-get install dcmtk

amunaaser
Posts: 40
Joined: Thu, 2020-03-26, 10:29

Re: DCMTK under Linux

#7 Post by amunaaser »

sudo apt-get install dcmtk

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 10%

Reading package lists... Done

Building dependency tree... 0%

Building dependency tree... 0%

Building dependency tree... 50%

Building dependency tree... 50%

Building dependency tree

Reading state information... 0%

Reading state information... 0%

Reading state information... Done
E: Unable to locate package dcmtk

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: DCMTK under Linux

#8 Post by Michael Onken »

Grrrr... try first:

Code: Select all

sudo apt-get update
and then retry installation.

You must be connected to internet. As far as I know, there is a DCMTK package in Ubuntu 18.

amunaaser
Posts: 40
Joined: Thu, 2020-03-26, 10:29

Re: DCMTK under Linux

#9 Post by amunaaser »

Hi Michael!

This is how it looks like since yesterday afternoon:
sudo apt-get install dcmtk

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 5%

Reading package lists... 5%

Reading package lists... 5%

Reading package lists... 5%

Reading package lists... 19%

Reading package lists... 35%

Reading package lists... 45%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 49%

Reading package lists... 50%

Reading package lists... 50%

Reading package lists... 58%

Reading package lists... 61%

Reading package lists... 61%

Reading package lists... 70%

Reading package lists... 70%

Reading package lists... 70%

Reading package lists... 76%

Reading package lists... 76%

Reading package lists... 76%

Reading package lists... 76%

Reading package lists... 76%

Reading package lists... 76%

Reading package lists... 76%

Reading package lists... 76%

Reading package lists... 86%

Reading package lists... 86%

Reading package lists... 86%

Reading package lists... 94%

Reading package lists... 94%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... Done

Building dependency tree... 0%

Building dependency tree... 0%

Building dependency tree... 0%

Building dependency tree... 50%

Building dependency tree... 50%

Building dependency tree... 83%

Building dependency tree

Reading state information... 0%

Reading state information... 0%

Reading state information... Done
The following additional packages will be installed:
libdcmtk14
The following NEW packages will be installed:
dcmtk libdcmtk14
0 upgraded, 2 newly installed, 0 to remove and 104 not upgraded.
Need to get 5546 kB of archives.
After this operation, 26.5 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Y


Should it take so much time?!
/Nasser Hosseini

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: DCMTK under Linux

#10 Post by Michael Onken »

You mean you wait 24 hours now or so? It should take less than a minute.

Probably something is wrong with your internet connection on your Linux system (or Virtual Machine) or there is a firewall.

amunaaser
Posts: 40
Joined: Thu, 2020-03-26, 10:29

Re: DCMTK under Linux

#11 Post by amunaaser »

Yes, exactly since yesterday!
I'll talk to our IT department.

Thank you very much for your help!
I will probably come back to you with more questions later. :)

Best regards
Nasser Hosseini

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest