# "command not found" after installing gdrive2 from port without errors



## John Watson (Jun 23, 2022)

I get "command not found" when typing "gdrive" at the command prompt after installing gdrive2 from port.
I'm following a tutorial and it shows the command working fine.
What am I missing?

Thanks for any help.


----------



## gpw928 (Jun 24, 2022)

It always helps to mention your version of FreeBSD, because I think that gdrive has been moved around a bit.
I'm suspecting you mean gdrive, and not gdrive2:

```
[strand.137] $ uname -a
FreeBSD strand.my.domain 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC amd64

[strand.138] $ grep gdrive2 /usr/ports/INDEX* || echo NO gdrive2
NO gdrive2

[strand.139] $ grep "^gdrive" /usr/ports/INDEX*
gdrive-2.1.1_2|/usr/ports/net/gdrive|/usr/local|Google Drive CLI Client|/usr/ports/net/gdrive/pkg-descr|dmgk@FreeBSD.org|net|go118-1.18.3||https://github.com/prasmussen/gdrive|||

[strand.140] $ pkg provides usr/local/bin/gdrive
Name    : gdrive-2.1.1_2
Desc    : Google Drive CLI Client
Repo    : FreeBSD
Filename: usr/local/bin/gdrive
```
If you have installed the gdrive port or package, then you should be able to execute `/usr/local/bin/gdrive`.
If `/usr/local/bin/gdrive` exists, then check that /usr/local/bin is in your PATH.


----------



## SirDice (Jun 24, 2022)

`pkg info -l gdrive2` is a useful command to see what and where things get installed.


```
-l, --list-files
             Display all files installed by pkg-name.
```
pkg-info(8)


----------



## John Watson (Jun 28, 2022)

Thank you both for your replies. As I mentioned, I installed gdrive2 from ports. It is a port that exists in the latest version (/usr/ports/net/grive2/) and appeared to install cleanly although there is not an executable installed. I'm going to try rclone instead.


----------



## SirDice (Jun 28, 2022)

John Watson said:


> I installed gdrive2 from ports


Ports create packages, so in the end everything is a package. And thus it gets registered in the package database and `pkg-info` will show the correct info. It doesn't matter if you used the port or installed the package.


----------



## T-Daemon (Jun 28, 2022)

John Watson said:


> As I mentioned, I installed *gdrive2* from ports. It is a port that exists in the latest version (*/usr/ports/net/grive2*/) and appeared to install cleanly although there is not an executable installed.


There seems a confusion in the naming: g*d*rive2 vs. net/grive2


```
pkg info -l grive2 | grep bin
    /usr/local/bin/grive
```


----------



## John Watson (Jun 28, 2022)

Sorry, I missed the typo in the tutorial.


----------

