日期:2014-05-16  浏览次数:20716 次

linux "PATH"变量问题
maadiah@localhost ~ $ echo $PATH
/home/maadiah/Embedded/arm-2011.03/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/arm-unknown-linux-gnu/gcc-bin/4.5.2:/usr/x86_64-pc-linux-gnu/gcc-bin/4.4.5:/usr/lib64/subversion/bin:/usr/games/bin:/home/maadiah/Download/android-sdk-linux_x86/tools:/home/maadiah/android-ndk-r6:/home/maadiah/Download/android-sdk-linux_x86/platform-tools:/home/maadiah/android-ndk-r6/toolchains/x86-4.4.3/prebuilt/linux-x86/bin:/home/maadiah/android-ndk-r6/platforms/android-9/arch-x86/usr/lib:/home/maadiah/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin

我重命名了红色目录里的可执行文件,但用Tab命令补全的时候还是出现之前的文件名:
应该是:
maadiah@localhost ~/Download/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin $ ls
arm-unknown-linux-androideabi-addr2line arm-unknown-linux-androideabi-gprof
arm-unknown-linux-androideabi-ar arm-unknown-linux-androideabi-ld
arm-unknown-linux-androideabi-as arm-unknown-linux-androideabi-nm
arm-unknown-linux-androideabi-c++ arm-unknown-linux-androideabi-objcopy
arm-unknown-linux-androideabi-c++filt arm-unknown-linux-androideabi-objdump
arm-unknown-linux-androideabi-cpp arm-unknown-linux-androideabi-ranlib
arm-unknown-linux-androideabi-g++ arm-unknown-linux-androideabi-readelf
arm-unknown-linux-androideabi-gcc arm-unknown-linux-androideabi-run
arm-unknown-linux-androideabi-gcc-4.4.3 arm-unknown-linux-androideabi-size
arm-unknown-linux-androideabi-gcov arm-unknown-linux-androideabi-strings
arm-unknown-linux-androideabi-gdb arm-unknown-linux-androideabi-strip
arm-unknown-linux-androideabi-gdbtui

用TAB补全还是之前的:
arm-linux-androideabi-gcc
......
......

那里出错了呢?





















------解决方案--------------------
PATH中早引用的是以下这个目录
/home/maadiah/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/

你修改的文件名是以下这个目录, 你改错了.
~/Download/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin