FreeBSD 12.3-R perl5.34

166 views
Skip to first unread message

David Christensen

unread,
Feb 13, 2022, 3:09:42 PM2/13/22
to freebsd-...@freebsd.org
freebsd-questions:

I recently installed FreeBSD:

2022-02-13 12:03:20 toor@f4 ~
# freebsd-version ; uname -a
12.3-RELEASE
FreeBSD f4.tracy.holgerdanske.com 12.3-RELEASE FreeBSD 12.3-RELEASE
r371126 GENERIC amd64


Then I installed Perl:

2022-02-13 11:54:35 toor@f4 ~
# pkg install perl5.34
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
perl5.34: 5.34.0

Number of packages to be installed: 1

The process will require 60 MiB more space.
14 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] Fetching perl5.34-5.34.0.pkg: 100% 14 MiB 3.0MB/s 00:05
Checking integrity... done (0 conflicting)
[1/1] Installing perl5.34-5.34.0...
[1/1] Extracting perl5.34-5.34.0: 100%


But Perl does not work:

2022-02-13 11:59:02 toor@f4 ~/f4.tracy.holgerdanske.com
# perl -v
-bash: perl: command not found

2022-02-13 12:05:30 toor@f4 ~
# locate / -name perl | egrep 'perl$'
/usr/local/lib/perl5/5.34/perl
/usr/local/lib/perl5/site_perl
/usr/local/share/bash-completion/completions/perl
/usr/local/share/bash-completion/helpers/perl
/usr/local/lib/perl5/5.34/perl
/usr/local/lib/perl5/site_perl
/usr/local/share/bash-completion/completions/perl
/usr/local/share/bash-completion/helpers/perl


Comments or suggestions?


David

Herbert J. Skuhra

unread,
Feb 13, 2022, 3:22:38 PM2/13/22
to freebsd-...@freebsd.org
The default perl version is still 5.32. If you want 5.34 you have to set

DEFAULT_VERSIONS+= perl5=5.34

in /etc/make.conf and use ports.

Or you can use poudriere to build your own package repository.

--
Herbert

David Christensen

unread,
Feb 13, 2022, 3:39:11 PM2/13/22
to ques...@freebsd.org
Thank you for the reply.


I use packages. I have never encountered DEFAULT_VERSIONS before, nor
problems installing a Perl package.


STFW this page indicates DEFAULT_VERSIONS is for ports users:

https://wiki.freebsd.org/Ports/DEFAULT_VERSIONS

DEFAULT_VERSIONS is the mechanism that allows the user to set or
override which version of software they want to be used as the
dependency for other ports.


How do I determine which package is the default when there is more than
one choice?

2022-02-13 12:34:58 toor@f4 ~
# pkg search perl | egrep '^perl5.+5.3' | sort
perl5-5.32.1_1 Practical Extraction and Report Language
perl5-devel-5.35.4.102 Practical Extraction and Report Language
perl5.30-5.30.3_1 Practical Extraction and Report Language
perl5.34-5.34.0 Practical Extraction and Report Language


David

edgar

unread,
Feb 13, 2022, 6:27:58 PM2/13/22
to David Christensen, freebsd-...@freebsd.org




Sent via the Samsung Galaxy A10e, an AT&T 4G LTE smartphone
It's either not in your $PATH or named something other than perl. I would do:

pkg info --list-files perl5.34

See where the executable ended up and then put a symlink to it from somewhere like ~/bin/perl.

Edgar

David Christensen

unread,
Feb 13, 2022, 7:06:49 PM2/13/22
to ques...@freebsd.org
On 2/13/22 12:08, David Christensen wrote:
> freebsd-questions:
>
> I recently installed FreeBSD:
>
> 2022-02-13 12:03:20 toor@f4 ~
> # freebsd-version ; uname -a
> 12.3-RELEASE
> FreeBSD f4.tracy.holgerdanske.com 12.3-RELEASE FreeBSD 12.3-RELEASE
> r371126 GENERIC  amd64
>
>
> Then I installed Perl:
>
> 2022-02-13 11:54:35 toor@f4 ~
> # pkg install perl5.34

> But Perl does not work:
>
> 2022-02-13 11:59:02 toor@f4 ~/f4.tracy.holgerdanske.com
> # perl -v
> -bash: perl: command not found


I removed Perl 5.34 and installed Perl 5.32.1:

2022-02-13 13:17:45 toor@f4 ~
# pkg remove perl5.34
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0
packages in the universe):

Installed packages to be REMOVED:
perl5.34: 5.34.0

Number of packages to be removed: 1

The operation will free 60 MiB.

Proceed with deinstalling packages? [y/N]: y
[1/1] Deinstalling perl5.34-5.34.0...
[1/1] Deleting files for perl5.34-5.34.0: 100%

2022-02-13 13:19:37 toor@f4 ~
# pkg install perl5-5.32.1_1
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
perl5: 5.32.1_1

Number of packages to be installed: 1

The process will require 59 MiB more space.
14 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] Fetching perl5-5.32.1_1.pkg: 100% 14 MiB 3.7MB/s 00:04
Checking integrity... done (0 conflicting)
[1/1] Installing perl5-5.32.1_1...
[1/1] Extracting perl5-5.32.1_1: 100%

2022-02-13 13:20:59 toor@f4 ~
# perl -v

This is perl 5, version 32, subversion 1 (v5.32.1) built for
amd64-freebsd-thread-multi

Copyright 1987-2021, Larry Wall

Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.


David

Reply all
Reply to author
Forward
0 new messages