You are not logged in.

#1 2020-08-08 01:55:51

nokdoot
Member
Registered: 2020-08-01
Posts: 6

cpan and cpanm does not exist on PATH

after install perl, and cpanminus

cpan is in /usr/bin/core_perl
cpanm is in /usr/bin/vendor_perl.

so when I use them, I get
bash: cpan: command not found

Offline

#2 2020-08-08 02:34:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,517
Website

Re: cpan and cpanm does not exist on PATH

You need to log back in so the profile scripts are sourced (or just source them manually).

EDIT: this is assume it's an archlinux system.  Is this still on your Manjaro laptop?

Last edited by Trilby (2020-08-08 02:37:11)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2020-08-08 04:28:56

nokdoot
Member
Registered: 2020-08-01
Posts: 6

Re: cpan and cpanm does not exist on PATH

Trilby wrote:

You need to log back in so the profile scripts are sourced (or just source them manually).

EDIT: this is assume it's an archlinux system.  Is this still on your Manjaro laptop?


It's arch, I accessed docker container and install them.

I thought pacman have to make symbolic link for them on $PATH.



source? I did not add those paths to $PATH

Offline

#4 2020-08-08 04:36:18

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: cpan and cpanm does not exist on PATH

nokdoot wrote:

source? I did not add those paths to $PATH

Read the PKGBUILD: you don't need to manually add them.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2020-08-08 06:35:35

mpan
Member
Registered: 2012-08-01
Posts: 1,642
Website

Re: cpan and cpanm does not exist on PATH

nokdoot wrote:

I thought pacman have to make symbolic link for them on $PATH.

pacman does not even know your $PATH, not to mention being able to do anything based on it. However, the package contains a file that should set your $PATH to the right value: it will be sourced automatically. Have you, as Trilby asked, logged out and in again? If your profile script is properly written and this is Arch, it should work.

Offline

#6 2020-08-08 08:55:46

nokdoot
Member
Registered: 2020-08-01
Posts: 6

Re: cpan and cpanm does not exist on PATH

UM.... It's docker container so I can't log out and in

PKGBUILD is also relevant installing by 'pacman -S'?

Offline

#7 2020-08-08 09:46:34

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,650
Website

Re: cpan and cpanm does not exist on PATH

Please include some reference to docker in your topic title, since the problem seems to be stemming from that.

How are you running the docker container? Why are you trying to run cpan in a container? What is your end goal?

Mod note: Not a pacman issue, moving to NC.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#8 2020-08-08 12:22:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,517
Website

Re: cpan and cpanm does not exist on PATH

nokdoot wrote:

It's docker container so I can't log out and in

Aaaand, this is exactly why I phrased my proper solution as a conditional either, or:

Trilby wrote:

... or just source them manually

If you don't know how to source a profile snippet then you should not be using arch for your docker image.

Or more broadly, if you have no idea how arch linux works, having never installed it, you should not use it in a docker image.  And if you do there is no way we can actually help you via a web forum which is precisely why we have the community guideline that we can't / don't support such efforts here.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#9 2020-08-09 14:32:38

nokdoot
Member
Registered: 2020-08-01
Posts: 6

Re: cpan and cpanm does not exist on PATH

WorMzy wrote:

Please include some reference to docker in your topic title, since the problem seems to be stemming from that.

How are you running the docker container? Why are you trying to run cpan in a container? What is your end goal?

Mod note: Not a pacman issue, moving to NC.


I'm about to build docker image that can be container running perl web server.

So I'm testing build to make image having bins(cpan or cpanm) that I need to install perl module


Trilby wrote:

If you don't know how to source a profile snippet then you should not be using arch for your docker image.

I agree that... :< I have to learn docker and arch

Offline

#10 2020-08-09 14:41:11

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: cpan and cpanm does not exist on PATH

nokdoot wrote:

I'm about to build docker image that can be container running perl web server.

So I'm testing build to make image having bins(cpan or cpanm) that I need to install perl module

If you build the image, then test it by entering the built image, it should work fine, no?

Your problem would only manifest if you're using the same docker shell session to install perl *and* run its programs.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#11 2020-08-09 14:52:24

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,517
Website

Re: cpan and cpanm does not exist on PATH

nokdoot wrote:

I agree that... :< I have to learn docker and arch

Why do you have to?  Use a docker image of an OS you're more familiar with.

If you really do want to learn *both*, that's a respectable goal, but flailing with both at the same time is not a productive way to learn.  This is especially the case for arch linux.  If you want to learn to use arch linux, install arch linux.

Given that you have not installed arch, I'm really not sure why this thread is still open as it goes against our forum rules.  But I guess the moderators see it differently.  As I see it, we can support arch in a VM given that one installs arch in a VM, but if one inherits a VM image with arch pre-installed/configured, then we woud not (and by precedent do not) support that.  I don't see how this is any different.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB