Package path error when trying to install lib package in C - c

I am trying to install libpackedobjects on my fedora 17. The path that I am trying to install it on is home/libpackedobjects. The steps that I am following are:
git clone git://gitorious.org/libpackedobjectsd/libpackedobjectsd.git
cd libpackedobjectsd
autoreconf -i
./configure
when I am trying to run the ./configure I am getting error:
checking for LIBPACKEDOBJECTS... no
configure: error: Package requirements (libpackedobjects) were not met:
No package 'libpackedobjects' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables LIBPACKEDOBJECTS_CFLAGS
and LIBPACKEDOBJECTS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
I do understand that the path can not be found, but do not know how to repair the problem. Any suggestions?

As evident from your error report:
checking for LIBPACKEDOBJECTS... no
configure: error: Package requirements (libpackedobjects) were not met:
No package 'libpackedobjects' found
Hence, You have to install the packages libpackedobjects and libXml2to install the libpackedobjectsd.
If you still get this error after installing the depenedent packages, there might be a PATH issue or linking issue.

Related

Homebrew Mac M1 can't find installs

I just switched to a M1 MacBook Air and I'm having trouble with Homebrew. The installation went fine I think, and then I added it to my path with the given commands:
Run these two commands in your terminal to add Homebrew to your PATH:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/xxx/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
I also did brew install cunit and then when I typed brew list CUnit was listed there so I'm assuming the brew install of cunit worked.
But when I run my C test code this is what I get:
test/test.c:3:10: fatal error: 'CUnit/Basic.h' file not found
#include <CUnit/Basic.h>
^~~~~~~~~~~~~~~
1 error generated.
make: *** [test_compile] Error 1
I have been sitting with this for three days, called Apple support, searched every page related to this and still can't find a solution that works.
Has anyone had the same problem? PLEASE help
Homebrew installs into /opt/homebrew by default on M1 Macs, and no longer links into /usr/local by default (to prevent clashes with Rosetta library installs). This means that include files and libraries can't be found without explicitly telling the compiler/linker where your Homebrew packages are installed.
The easiest way of doing this is by setting the CPATH environmental variable before compiling:
export CPATH=/opt/homebrew/include
Add the above line to your shell profile (.zprofile for zsh, or .bash_profile for bash) and it will be used in all future compilations.
For dependencies which also require shared libraries, you will need to also signpost the location of Homebrew's new lib path:
export LIBRARY_PATH=/opt/homebrew/lib

Install ffmpeg-light with cabal

I want to install the ffmpeg-light library from hackage via cabal on Windows 10 (64 bit). So I downloaded ffmpeg and extracted it to C:\FFmpeg.
At first pkg-config was complaining that it could not find various packages. I solved this problem with .pc files.
When I tried to use the command: cabal install ffmpeg-light cabal complained about missing C-libraries, being exactly those for which I created the .pc files.
Then I tried the command: cabal install ffmpeg-light --extra-lib-dirs=C:\FFmpeg\lib. Now I have a different error message, which says:
Enums.hsc:7:32: fatal error: libavcodec/avcodec.h: No such file or directory
Edit:
Then I tried the following command:
cabal install ffmpeg-light --extra-lib-dirs=C:\FFmpeg\lib \
--extra-include-dirs=C:\FFmpeg\include
Now first the compiler gives some warnings about deprecated functions in ffmpeg and redundant imports in ffmpeg-light, but compiles 11 of 11. But the build is still not successfull.
In-place registering ffmpeg-light-0.11.1...
setup-Simple-Cabal-1.22.5.0-x86_64-windows-ghc-7.10.3.exe:
'C:\Haskell\bin\ghc-pkg.exe' exited with an error:
ffmpeg-light-0.11.1: Warning: haddock-interfaces:
C:\Users\HOLEYC~1\AppData\Local\Temp\cabal-tmp-2824\ffmpeg-light-0.11.1\dist\doc\html\ffmpeg-light\ffmpeg-light.haddock
doesn't exist or isn't a file
ffmpeg-light-0.11.1: Warning: haddock-html:
C:\Users\HOLEYC~1\AppData\Local\Temp\cabal-tmp-2824\ffmpeg-light-0.11.1\dist\doc\html\ffmpeg-light
doesn't exist or isn't a directory
ffmpeg-light-0.11.1: library-dirs: C:FFmpeglib is a relative path which makes
no sense (as there is nothing for it to be relative to). You can make paths
relative to the package database itself by using ${pkgroot}. (use --force to
override)
ffmpeg-light-0.11.1: include-dirs: C:FFmpeginclude is a relative path which
makes no sense (as there is nothing for it to be relative to). You can make
paths relative to the package database itself by using ${pkgroot}. (use
--force to override)
cabal: Error: some packages failed to install:
ffmpeg-light-0.11.1 failed during the building phase. The exception was:
ExitFailure 1
Some additional information:
cabal version: cabal-install version 1.22.6.0
using version 1.22.5.0 of the Cabal library
gcc version of my installed Haskell platform: 5.2.0
Example .pc file I used for pkg-config:
Name: libavcodec
Description: Library for ffmpeg
Version: 57
Cflags: -IC:\FFmpeg\include
Libs: -LC:\FFmpeg\lib -llibavcodec
OK. I figured it out. The --ghc-pkg-options="--force" option was needed.
cabal install ffmpeg-light --extra-lib-dirs=C:\FFmpeg\lib --extra-include-dirs=C:\FFmpeg\include --ghc-pkg-options="--force"

Compiling Ruby error: Failed to configure openssl. It will not be installed

On OSX, after downloading the ruby repository latest commit from github and following the instructions to build, I run make but I get the error:
Failed to configure openssl. It will not be installed.
If I run make check, I get more information.
Skipping `gem cert` tests. openssl not found.
...
`<class:TestGemRemoteFetcher>': uninitialized constant TestGemRemoteFetcher::OpenSSL (NameError)
Clearly it cannot find openssl, but I have it installed via Brew. What am I missing?
There are many answers to this sort of question out there (this, for example), but I can't seem to make any of the solutions work.
Brew install openssl library as a keg-only. Try passing path to your openssl to your build script:
./configure --with-openssl-dir="$(brew --prefix openssl)"

How to install cjson properly in Ubuntu 14.0LTS?

I am new in json and I don't know how to use but I found compare to XML json is better so, I am learning json in C programming in Ubuntu 14.0LTS.
I followed https://linuxprograms.wordpress.com/2010/05/20/install-json-c-in-linux/.
In this link, I installed libjson0 with the help of first command but when I installed libjson – debug symbols package with the help of second command which is mentioned in link then showing "E: Unable to locate package libjson0-dbg".
Also I gone through https://github.com/json-c/json-c. After cloning moved to json-c directory, in json-c directory I did sh autogen.sh then showing "autogen.sh: 2: autogen.sh: autoreconf: not found".
Why autoreconf is not works ? When I installed CppUTest and other stuffs then it works.
I also install build-essential which found in google for above problems but it can't works for me.
How can I installed cjson in a proper manner and how to use with the C-programms.
Try below commands:
$ sudo apt-get install libjson-glib-1.0-0 libjson-glib-1.0-0-dev
If you want to debug your programs and see the various steps of serializing/deserializing you can also install the libjson-glib – debug symbols package
$ sudo apt-get install libjson-glib-1.0-0-dbg
For documentation related to json-glib, you must install the following package
$ sudo apt-get install libjson-glib-1.0-0-doc
This documentation will then be available in file:///usr/share/gtk-doc/html/json-glib/index.html
Maybe your problem is related with the path.
The library is installed correctlly but you have tot tell the system where. Here a post on how to do it in Ubuntu How to set the environmental variable LD_LIBRARY_PATH in linux

AIX Package Install Issues

I want to install gettext but i cannot because my AIX says that gettext is dependent on glib and when i try to install glib it says that I cannot because glib is in turn dependent on gettext.
Please let me know how I could get past this situation?
root [rover]% rpm -i gettext-0.17-1.aix5.1.ppc.rpm
error: failed dependencies: libglib-2.0.a(libglib-2.0.so.0) is needed by gettext-0.17-1
libxlsmp.a(smprt.o) is needed by gettext-0.17-1
root [rover]% rpm -i glib2-2.22.5-2.aix5.1.ppc.rpm
error: failed dependencies: gettext is needed by glib2-2.22.5-2
You really have 2 problems:
error: failed dependencies: libglib-2.0.a(libglib-2.0.so.0) is needed by gettext-0.17-1
libxlsmp.a(smprt.o) is needed by gettext-0.17-1
The first error is indeed solved by what is said above (DO NOT use the --nodeps option in this case, it can cause really bad things to happen): use rpm -i (or -U for upgrade) to install both gettext and glib2 at the same time. If you have both in the same directory you can just use rpm -ihv (or -Uhv) *.rpm to install all of the RPM's at once, and it will resolve interdependencies that way.
HOWEVER, you still will not likely be able to install gettext due to #2: libxlsmp.a is a SECOND library/dependency that you need to solve.
It's my understanding that this library comes from a base AIX package (NOT an RPM/Open Source package) that will need to be installed from your AIX installation Media by installp. According to other web research it's the "xlsmp" package.
You have to pass in both files at once for dependency resolution to work: rpm -U gettext.rpm glib2.rpm.
I am not sure this will work or not, but install one of the package ignoring the dependencies.
use --nodeps flag of rpm to do this. Once it is installed, then go ahead with the other package.
root [rover]% rpm --nodeps -i gettext-0.17-1.aix5.1.ppc.rpm
Make sure to resolve other dependencies (if any) later if you are following this.

Resources