Score:0

"bash: cd: /home/marcoluis/.local/bin: Not a directory"

ca flag

While trying to install ade(Awesome Development Environment) through Ubuntu Terminal, for a Autoware.Auto Course , I've ran into a problem while moving the ade executable from "adehome" file to path "~/.local/bin". After the following commands:

~/adehome$ mv ade ~/.local/bin
~/adehome$ which ade

No directory appears, and by trying to enter such directory, appears the following message:

bash: cd: /home/marcoluis/.local/bin: Not a directory

How can I retrieve the filepath in order to continue? Or should I just try again the steps given?

Edit: After checking ~/.local filepath list, the following output path is given:

$ ls -la ~/.local
total 7828
drwx------  3 marcoluis marcoluis    4096 out 15 14:25 .
drwxr-xr-x 18 marcoluis marcoluis    4096 out 15 14:22 ..
-rwxrwxr-x  1 marcoluis marcoluis 7999712 jan 26  2020 bin
drwx------ 14 marcoluis marcoluis    4096 out 15 14:49 share
muru avatar
us flag
Did the `~/.local/bin` directory already exist when you did that `mv`? If not, you just renamed your `ade` file to the `bin` file in `~/.local`.
Marco Luís avatar
ca flag
I am not sure if it existed or not, the video classes say that the file path should exist in any ubuntu machine. Is there anyway I can reverse this?
user535733 avatar
cn flag
Your video classes are mistaken. A stock install of Ubuntu does not include that directory, which would be empty anyway. However, it is trivial to create the directory, and it is very likely that your error can be undone.
Marco Luís avatar
ca flag
Seems like I did rename the ade file into bin. SO could you tell me whats the best way to proceed?
Liso avatar
sd flag
@MarcoLuís Create `~/.local/bin` then add to your `$PATH`.
Marco Luís avatar
ca flag
I ended up moving the file back to adehome, renamed it and then moved it towards the new bin file I created in ~/.local. Just one more dumb question, the bin file that is the ade renamed file appeared green in the ~/.local path. WHat does that mean?
user535733 avatar
cn flag
See https://askubuntu.com/questions/17299/what-do-the-different-colors-mean-in-ls for an explanation of the colors.
Marco Luís avatar
ca flag
Thanks everyone for the help!
Score:2
cn flag

Your ~/.local/bin is not a directory, but a large file. The directory likely did not yet exist when you executed the command. In that case, move interprets /bin as the target filename and thus renames the file ade to a file named bin under ~/.local.

It will interpret /bin as a directory only if that directory exists. Thus, rename that bin file back to ade, and create the bin directory:

mkdir -p ~/.local/bin

Then you can move the file to the desired directory:

mv ~/.local/ade ~/.local/bin

On Ubuntu, the ~/.local/bin directory will automatically be included in your search PATH if you log out then back in.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.