LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Installing mtpfs 1.1.tar gz for Fedora 19 (https://www.linuxquestions.org/questions/fedora-35/installing-mtpfs-1-1-tar-gz-for-fedora-19-a-4175492097/)

gengisdave 01-24-2014 05:23 AM

Quote:

Originally Posted by Ztcoracat (Post 5104067)
Code:

gcc  -g -O2  -o mtpfs mtpfs-mtpfs.o mtpfs-id3read.o -pthread -lfuse  -pthread -lgthread-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0  -lmtp -lusb-1.0  -lmad -lm -lid3tag

[redcat@localhost mtpfs-1.1]$ make install
make[1]: Entering directory `/home/redcat/Downloads/mtpfs-1.1'
test -z "/usr/local/bin" || /usr/bin/mkdir -p "/usr/local/bin"
  /usr/bin/install -c mtpfs '/usr/local/bin'
/usr/bin/install: cannot create regular file ‘/usr/local/bin/mtpfs’: Permission denied
make[1]: *** [install-binPROGRAMS] Error 1
make[1]: Leaving directory `/home/redcat/Downloads/mtpfs-1.1'
make: *** [install-am] Error 2

Not sure what this means--

"easy" (when you do this every day :)); compile was successful, but you tried to install into /usr/local/bin from user, not root, and have no permission to do that: "ls -l /usr/local/ | grep bin" show you "rwxr-xr-x root root", meaning only root can write in it, then?

just use "sudo make install", or do "make install" as root

ADD: as you see, program is installed in /usr/local/bin instead of /usr/bin, this is a default for every program you build manually, to change it, add "--prefix=/usr" to the ./configure, as "./configure --prefix=/usr" (as said by JohnVV)

Ztcoracat 01-24-2014 05:50 PM

If I understand you gengisdave; I need to type this at the prompt?

Code:

root@redlocalhost~]$./configure --prefix=/usr/bin
Should the word prefix literally be typed? Or should I be replacing 'prefix' with some other name?

gengisdave 01-24-2014 05:56 PM

"prefix" is a parameter for configure, it tells to the script that will generate the makefiles where we want the files go, saying --prefix=/usr, the makefile will be generated so binaries will go in /usr/bin, include in /usr/include, libraries in /usr/lib(64) etc

Ztcoracat 01-24-2014 06:19 PM

Quote:

Originally Posted by gengisdave (Post 5104706)
"prefix" is a parameter for configure, it tells to the script that will generate the makefiles where we want the files go, saying --prefix=/usr, the makefile will be generated so binaries will go in /usr/bin, include in /usr/include, libraries in /usr/lib(64) etc

Thanks for explaining. Still having trouble and I lack the experience that you have.

Code:

[redcat@localhost mtpfs-1.1]$ ./configure --prefix=/usr/bin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FUSE... yes
checking for MTP... yes
checking for GLIB... yes
checking for MAD... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
[redcat@localhost mtpfs-1.1]$ su
Password:
[root@localhost mtpfs-1.1]# make install
make[1]: Entering directory `/home/redcat/Downloads/mtpfs-1.1'
test -z "/usr/bin/bin" || /usr/bin/mkdir -p "/usr/bin/bin"
  /usr/bin/install -c mtpfs '/usr/bin/bin'
make[1]: Nothing to be done for `install-data-am'.
make[1]: Leaving directory `/home/redcat/Downloads/mtpfs-1.1'
[root@localhost mtpfs-1.1]#


John VV 01-24-2014 06:51 PM

Quote:

./configure --prefix=/usr/bin
no , almost but not quite

/usr NOT /usr/bin

the root "tree" for user space is /usr

if you were to use /usr/bin it would install into the wrong folders
/usr/bin/bin
/usr/bin/lib64
/usr/bin/include
/usr/bin/share

-- one too many "bin" folders


almost all fedora programs install to /usr
that is the default location for fedora

now you CAN use a secondary location BUT that brings with it some complications
-- for now you really do not want to have to deal with those

so use --prefix=/usr
and things will install just fine

Ztcoracat 01-24-2014 07:25 PM

Still not right is it?

Code:

[redcat@localhost mtpfs-1.1]$ ./configure --prefix=/usr
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FUSE... yes
checking for MTP... yes
checking for GLIB... yes
checking for MAD... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
[redcat@localhost mtpfs-1.1]$ su
Password:
[root@localhost mtpfs-1.1]# make install
make[1]: Entering directory `/home/redcat/Downloads/mtpfs-1.1'
test -z "/usr/bin" || /usr/bin/mkdir -p "/usr/bin"
  /usr/bin/install -c mtpfs '/usr/bin'
make[1]: Nothing to be done for `install-data-am'.
make[1]: Leaving directory `/home/redcat/Downloads/mtpfs-1.1'

Quote:

and things will install just fine
Something still is not going correctly....(I Think) because of the Nothing to be done for 'install-data-am' Am I wrong?

John VV 01-24-2014 09:27 PM

although "make install" can sometimes be used as a shortcut
it is not a good idea
"make" should be ran as a NORMAL user

as root clean the build folder
there a few ways
start over with a clean extract of the tarball
or run "AS ROOT for this seeing as you ran "make" as root last time
Code:

su
make distclean

then
as a normal non root user
Code:

./configure --prefix=/usr
make
su
--- root password when asked for ---
make install


Ztcoracat 01-24-2014 10:19 PM

Code:

[root@localhost mtpfs-1.1]# make distclean
test -z "mtpfs" || rm -f mtpfs
rm -f *.o
rm -f *.tab.c
test -z "" || rm -f
test . = "." || test -z "" || rm -f
rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
rm -f config.status config.cache config.log configure.lineno config.status.lineno
rm -rf ./.deps
rm -f Makefile
[root@localhost mtpfs-1.1]#

Trying again exactly in the order you told me.
1) ./configure --prefix=/usr
2)make
3)su
4)make install

Code:

[redcat@localhost mtpfs-1.1]$ ./configure --prefix=/usr
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FUSE... yes
checking for MTP... yes
checking for GLIB... yes
checking for MAD... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
[redcat@localhost mtpfs-1.1]$ make
make: Nothing to be done for `all'.
[redcat@localhost mtpfs-1.1]$ su
Password:
[root@localhost mtpfs-1.1]# make install
make[1]: Entering directory `/home/redcat/Downloads/mtpfs-1.1'
test -z "/usr/bin" || /usr/bin/mkdir -p "/usr/bin"
  /usr/bin/install -c mtpfs '/usr/bin'
make[1]: Nothing to be done for `install-data-am'.
make[1]: Leaving directory `/home/redcat/Downloads/mtpfs-1.1'
[root@localhost mtpfs-1.1]#

Getting a fresh tarball now-bb

Ztcoracat 01-24-2014 10:35 PM

Still looking as I have only been able to find mtpfs for FC 18-
http://rpm.pbone.net/index.php3?stat...tpfs&srodzaj=3

It's probably a bad idea to download the mtpfs tarball for FC 18 and extract it for FC 19? Right?

gengisdave 01-25-2014 03:33 AM

your last chain was perfect, it's a small packages, it has no libraries, just the binary

Ztcoracat 01-25-2014 04:48 PM

Quote:

Originally Posted by gengisdave (Post 5104881)
your last chain was perfect, it's a small packages, it has no libraries, just the binary

Does that mean I have done all that I can and it's complete?

gengisdave 01-25-2014 06:10 PM

yes, it only install the binary mtpfs in /usr/bin, as told by your configure parameters;

the string "nothing to be done..." is normal during make, as makefile contain a sequence of command to build the package and some of them exist, but have no relevant command, like pressing enter in a shell without entering a command, it does nothing but you have pressed enter

Ztcoracat 01-25-2014 06:26 PM

Thank you for explaining that it's normal during make.
I thought something was wrong.

Is there any other steps I need to proceed with?

gengisdave 01-25-2014 06:35 PM

no, just use it (and i'm interested too), just a thing more, if you want to delete it, just do a "make uninstall", you can delete the source folder, and in the future just do "./configure --prefix=/usr" and "make uninstall", remember the prefix you used or the makefile won't find anything

EDIT: the end of the world, my phone as a usbdrive :)

Ztcoracat 01-25-2014 07:05 PM

It's installed and that's good.
http://s1052.photobucket.com/user/Ul...mtpfs.png.html

BTW I also installed 'simple-mtpfs' as Jeremy advised me.
I'm very sorry to say that installing 'mtpfs' & 'simple-mtpfs' has made no difference or at least; so far it hasn't.

You guys are the best!
Thank you allfor teaching me this compilation process!;)


All times are GMT -5. The time now is 03:47 PM.