You are not logged in.

#1 2024-06-17 18:54:40

masterbot
Member
Registered: 2019-12-06
Posts: 5

[SOLVED] System is not looking into /usr/local/bin first!

So I have the default php version from archlinux repo and I install php73 from aur packages.. I need the system to use php73 cli with php command.
So what I did is link the php73 into /usr/local/bin like this

ln -s /usr/bin/php73 /usr/local/bin/php

but if I type php -v I still get the 8.3 version from aur package.

[masterb0t@archlinux ~]$ php -v 
PHP 8.3.8 (cli) (built: Jun  7 2024 19:46:15) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.8, Copyright (c) Zend Technologies
[masterb0t@archlinux ~]$ /usr/local/bin/php -v 
PHP 7.3.33 (cli) (built: Mar 27 2024 16:51:45) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.33, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.33, Copyright (c) 1999-2018, by Zend Technologies

My $PATH

[masterb0t@archlinux ~]$ echo $PATH
{/usr/local/bin:/usr/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/masterb0t/Android/Sdk//tools:/home/masterb0t/Android/Sdk//platform-tools:/home/masterb0t/Android/Sdk//emulator:ANDROID_SDK_ROOT/tools:ANDROID_SDK_ROOT/platform-tools:}:/home/masterb0t/bin:/usr/lib/jvm/java-8-openjdk/bin

Last edited by masterbot (2024-06-17 21:02:59)

Offline

#2 2024-06-17 19:12:16

ayekat
Member
Registered: 2011-01-17
Posts: 1,632

Re: [SOLVED] System is not looking into /usr/local/bin first!

Have you run `hash -r` in your shell after creating that symlink (or just launched a new shell)?


pkgshackscfgblag

Offline

#3 2024-06-17 19:24:41

masterbot
Member
Registered: 2019-12-06
Posts: 5

Re: [SOLVED] System is not looking into /usr/local/bin first!

I just Try with hash -r and nothing.. before I didnt just new shell and reboot

Offline

#4 2024-06-17 20:02:23

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

Re: [SOLVED] System is not looking into /usr/local/bin first!

{/usr/local/bin

Why is that curly brace there?

Mod note: 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

#5 2024-06-17 21:02:05

masterbot
Member
Registered: 2019-12-06
Posts: 5

Re: [SOLVED] System is not looking into /usr/local/bin first!

Thanks That was. I didnt realize I have some old export in my bashrc thanks.

Offline

Board footer

Powered by FluxBB