igoryonya has asked for the wisdom of the Perl Monks concerning the following question:
Everything installed correctly.cpan install Tk
I also tried to run cpan with sudo and installing Tk from sudoed cpan, It also successfully installed, but the program still gives me an error.Can't locate Tk.pm in @INC (you may need to install the Tk module) (@I +NC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /u +sr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/ +share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 +/usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /m +nt/igor/bin/fdupes-gui.pl line 71.
I tried both with sudo and without, also, I've tried to explicitly install it from root. Every time, it installs correctly, but the program keeps saying, that Tk.pm was not found. I entered cpan and tried to check installed Tk for updates with both ways of cpan, i.e. sudoed and regular:cpan -i Tk
It gave me:r Tk
Then, I searched the common denominated folders from the list of given folders in the error above, i.e.:All modules are up to date for Tk
I've found it in:find /etc /usr -iname '*Tk*.pm'
I've checked, none of the folders, that perl looks for libs doesn't match this one:/usr/local/lib/x86_64-linux-gnu/perl/5.20.2/
I checked my perl version with:/etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base
It gave me:perl -v
I feel, that somehow, I need to tell cpan, that I have a v5.22.1 perl version and not 5.20.2, so it installs module in the correct folder. How can I do it? Or how can I fix this?v5.22.1
While troubleshooting, I didn't find the root of evil on how to resolve the issue, but found out, that Ubuntu has a 'perl-tk' package. I've tried to install it. I don't know, honestly, what has changed, but my program started launching and working.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can't get Tk.pm to work
by marto (Cardinal) on Jan 26, 2018 at 11:00 UTC | |
by igoryonya (Pilgrim) on Jan 26, 2018 at 15:31 UTC | |
by marto (Cardinal) on Jan 26, 2018 at 16:12 UTC | |
by igoryonya (Pilgrim) on Jan 26, 2018 at 22:44 UTC | |
by hippo (Archbishop) on Jan 26, 2018 at 16:27 UTC | |
by igoryonya (Pilgrim) on Jan 26, 2018 at 22:46 UTC | |
by poj (Abbot) on Jan 27, 2018 at 09:07 UTC | |
| |
|
Re: Can't get Tk.pm to work
by shmem (Chancellor) on Jan 27, 2018 at 10:34 UTC | |
|
Re: Can't get Tk.pm to work
by Anonymous Monk on Jan 27, 2018 at 09:00 UTC | |
|
Re: Can't get Tk.pm to work
by MorayJ (Beadle) on Jan 26, 2018 at 11:25 UTC | |
by marto (Cardinal) on Jan 26, 2018 at 11:34 UTC | |
by igoryonya (Pilgrim) on Jan 26, 2018 at 15:35 UTC | |
by marto (Cardinal) on Jan 26, 2018 at 15:48 UTC | |
by Happy-the-monk (Canon) on Jan 26, 2018 at 15:47 UTC | |
by igoryonya (Pilgrim) on Jan 26, 2018 at 22:58 UTC | |
|
Re: Can't get Tk.pm to work [SOLVED]
by j8a (Initiate) on Feb 20, 2019 at 19:07 UTC |