Docker: Can't locate Tk.pm in @INC (you may need to install the Tk module) on Linux

Viewed 3400

I am trying to run a simple perl gui made using Tk module on a ubuntu:16.04 container using both perl:latest and activestate/circleci-activeperl:latest images.

I get error Can't locate Tk.pm in @INC (you may need to install the Tk module)

What is the command to install the Tk module on the Linux container environment for perl?

I have used cpan to install Tk as below

$ perl -MCPAN -e shell
cpan> install Tk

I get the below error enter image description here

1 Answers
apt-get install perl-tk

helped in installation of perl-tk module.

Related