เมื่อฉันทำ
which pip3
ฉันเข้าใจ
/usr/local/bin/pip3
แต่เมื่อฉันพยายามที่จะดำเนินการpip3ฉันได้รับข้อผิดพลาดดังต่อไปนี้:
bash: /usr/bin/pip3: No such file or directory
นี่เป็นเพราะฉันเพิ่งลบไฟล์นั้น ตอนนี้whichจุดที่คำสั่งรุ่นของผู้อื่นpip3ที่อยู่ใน/usr/local/binแต่เปลือกยังคงจำเส้นทางที่ผิด ฉันจะทำให้มันลืมเส้นทางนั้นได้อย่างไร
whichคู่มือบอกว่า
which returns the pathnames of the files (or links) which would be executed in the current environment, had its arguments been given as commands in
a strictly POSIX-conformant shell. It does this by searching the PATH for executable files matching the names of the arguments. It does not follow
symbolic links.
ทั้งสอง/usr/local/binและ/usr/binอยู่ในPATHตัวแปรของฉันและ/usr/local/bin/pip3ไม่ใช่ลิงก์สัญลักษณ์มันเป็นไฟล์ปฏิบัติการ เหตุใดจึงไม่ทำงาน
pip3เชลล์ในขณะ/usr/binนั้นหรือไม่
hash -t pip3อะไร
hash -t pip3พิมพ์/usr/bin/pip3
typeeather whichกว่า typeสร้างขึ้นในเชลล์ posix และบอกคุณว่าเชลล์จะทำอะไรมากกว่าwhichที่จะพยายามเดาว่าเชลล์จะทำอะไร
/usr/local/bin/pip3คืออะไร?