Is it possible to install perl to /usr/local/bin without full sudo permissions
namely only sudo apt install ...
being allowed.
I have a DVD with a software, using /usr/local/bin/perl in shebang, variables, paths etc. Yet on my machine perl is in /usr/bin .
I am not admin on my machine. I asked IT to
to create copy or link to perl file ( sudo ln -s /usr/bin/perl /usr/local/bin/perl
) yet it might take time. Is there other way?
I have no admin/sudo permissions but allowed to install soft using standard package manager apt
.
Perl 5.22 but close version would probably do, Ubuntu 16.04
Update 1. As recommended in answers I run a replace on a copy of the soft. I though installed and used designated text replacement command rpl. Still curios are there other solution e.g. is it possible to compile perl into .deb package that I can installs into desired folder with apt install
.
Update 2. IT helpdesk created links for me, can run scripts now.
You can build Perl from source, then placing them to
/usr/local/bin
.Download perl tarball file from their website, unpack it.
Proceed to installation through
make
.This will install Perl version 5.22.0 to directory
/usr/local/bin
, which you can call the executable as/usr/local/bin/perl
.Although the most logical way would be replacing the shebang line to exactly
/usr/bin/perl
, you can do so by.Will change
#!/usr/local/bin/perl
→#!/usr/bin/perl
.