Não é possível fornecer a variável PATH

1

Eu posso source outras variáveis, exceto PATH

# cd /data/local
# mkdir env
# vi env/dev
<esc>i
PATH=/data/local/workspace/clang+llvm-5.0.0-aarch64-linux-gnu/bin:$PATH
CPLUS_INCLUDE_PATH=/data/local/workspace/clang+llvm-5.0.0-aarch64-linux-gnu/include/c++/v1:$CPLUS_INCLUDE_PATH
LD_LIBRARY_PATH=/data/local/workspace/clang+llvm-5.0.0-aarch64-linux-gnu/lib:$LD_LIBRARY_PATH
<esc>:wq
# source env/dev
# echo $PATH                               
/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
# echo $CPLUS_INCLUDE_PATH                 
/data/local/workspace/clang+llvm-5.0.0-aarch64-linux-gnu/include/c++/v1:
# echo $LD_LIBRARY_PATH                    
/data/local/workspace/clang+llvm-5.0.0-aarch64-linux-gnu/lib:

Estou em Android shell enraizado.

Eu posso definir $PATH no modo interativo no terminal

PATH=/data/local/workspace/clang+llvm-5.0.0-aarch64-linux-gnu/bin:$PATH
echo $PATH
/data/local/workspace/clang+llvm-5.0.0-aarch64-linux-gnu/bin:/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin

e eu posso fazer

which clang++
/data/local/workspace/clang+llvm-5.0.0-aarch64-linux-gnu/bin/clang++

mas incapaz de executar o executável presente no PATH !

# clang++
tmp-mksh: clang++: No such file or directory
# ./clang+llvm-5.0.0-aarch64-linux-gnu/bin/clang++
tmp-mksh: ./clang+llvm-5.0.0-aarch64-linux-gnu/bin/clang++: No such file or directory

Aqui está o dump hexadecimal de PATH conforme solicitado nos comentários

printf '%s\n' "$PATH" | hexdump -C
00000000  2f 73 62 69 6e 3a 2f 76  65 6e 64 6f 72 2f 62 69  |/sbin:/vendor/bi|
00000010  6e 3a 2f 73 79 73 74 65  6d 2f 73 62 69 6e 3a 2f  |n:/system/sbin:/|
00000020  73 79 73 74 65 6d 2f 62  69 6e 3a 2f 73 79 73 74  |system/bin:/syst|
00000030  65 6d 2f 78 62 69 6e 0a                           |em/xbin.|
00000038
    
por neckTwi 08.03.2018 / 08:09

0 respostas

Tags