I think this is simply a general c++ question:
I'm attempting to compile a local version of ffmpeg on Linux Fedora using the gnu c++ compiler. I have source code in a bunch of folders under:
~/<username>/Downloads/Code/ffmpeg_sources/
which is where I'm attempting to set the config flags to install the build to a target not under this tree but at a root level directory with local shared libraries:
/usr/local/
There is this following section near the beginning of the configuration file:
Standard options:
--prefix=PREFIX install in PREFIX []
--bindir=DIR install binaries in DIR [PREFIX/bin]
--datadir=DIR install data files in DIR [PREFIX/share/ffmpeg]
--docdir=DIR install documentation in DIR [PREFIX/share/doc/ffmpeg]
--libdir=DIR install libs in DIR [PREFIX/lib]
--shlibdir=DIR install shared libs in DIR [PREFIX/lib]
--incdir=DIR install includes in DIR [PREFIX/include]
--mandir=DIR install man page in DIR [PREFIX/share/man]
--enable-rpath use rpath to allow installing libraries in paths
not part of the dynamic linker search path
I may have completely misunderstood this, but I thought that setting a value like
--prefix=/usr/local
or
--prefix=[/usr/local]
might work, but it appears not to, as once the ./config, make&&make install is complete, it has done a bunch of stuff but there's nothing installed at the target. There are a LOT of new executable files built in the source directory, so presumably the build is working but I'm simply specifying the paths incorrectly? A part of the same problem is that it's unclear whether, once I've set the
--prefix=[PREFIX]
correctly, I need to set all of the further
--datadir, --libdir
etc. or whether the first --prefix value is enough?
What is the above configuration syntax trying to show me?
It should be the first one --prefix=/usr/local
but to install files in that location you need root privileges. So you need to either change to the root account su
or use sudo
if you are a sudo user
aka sudo make install
. Only do that for the install phase, don't build like that.
Also /usr/local
is usually the default install location so you don't usually need to specify that. Normally you only use --prefix
to install into a different location like --prefix=/opt
or your home folders: --prefix=$HOME/3rdparty
.
Incidentally, if you install into your home folder you won't need root privileges.