[SOLVED] Install gdrive, and general question about executables
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
On my system, the file gdrive-linux-arm64 has to be downloaded.
Afterward, this file has to be converted as an executable, following this text:
"Download gdrive from one of the links below. On unix systems run chmod +x gdrive after download to make the binary executable. The first time gdrive is launched (i.e. run gdrive about in your terminal not just gdrive)"
So, does it mean that the command
Code:
gdrive about
has to be typed to execute the file? Or is it the command
Code:
gdrive-linux-arm64 about
? Both are actually not working in my case.
A more general question: What command activate an executable file?
This is a very general description of an error. Can you be more precise? How do you know it's not working? What do you expect to happen, and what actually happens?
To execute, i.e. run, a file, it needs to fulfill a few conditions.
It must be in an executable format. That seems to be the case here.
It must have the execution flag set. The chmod command takes care of that.
It must be placed in a location where the system finds it. I suspect this is the crux in your case.
Like Windows, UNIX and Linux have a so-called execution path, a list of all the directories (Windows term: folders) that will be searched when a program is to be executed. If your program is not in one of those directories, it can't be executed just by typing its name.
You have two choices. Either move the file to a place where it can be executed. The execution path is in the variable PATH; to display it:
Code:
echo $PATH
The second choice is providing the file's directory path. If the file is named gdrive and resides in your home directory, you can do this:
Code:
cd
./gdrive about
or that
Code:
/home/YOURACCOUNTNAME/gdrive about
Oh, and the third choice is to add the directory where the file resides to the PATH. Not necessarily a good choice though, so I won't explain how it's done.
Last edited by berndbausch; 10-30-2018 at 07:05 AM.
In this case the path or file location is not in cause, as I am located in the directory containing the executable file.
In windows probably it works, but in Linux by default the current dir is not in the search PATH, so executables cannot be found even in the current directory - if it was not explicitly set.
Quote:
Originally Posted by Drosera_capensis
Code:
gdrive-linux-x64
or
/home/user/Downloads/gdrive-linux-x64
In both cases the result is "command not found"
Does it mean that my file is actually not executable, or that I have to use a command to run it?
that means the directory is not looked for executables, so you need to tell the os where are they located.
That's why you need to specify a directory (relative or absolute) as it was suggested.
But we still do not know what was actually and exactly made, so hard to tell you the exact solution. Tthat's why we want to se the result of:
Please forget the "gdrive-linux-arm64" file, I have mistyped the file name from the Github page.
Using the following command:
Code:
ls -ltr /home/user/Downloads/gdrive*
It yields this line:
Code:
-rwxrwxr-x 1 user user 7805504 Oct 30 11:21 /home/user/Downloads/gdrive-linux-x64
However, using:
Code:
/home/user/Downloads/gdrive-linux-x64 about
I got information on the googledrive account targeted, although it is not running the file.
Would you have any idea why? Are the commands not supposed to be before the filename, and not after?
Last edited by Drosera_capensis; 10-30-2018 at 11:12 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.