Installing Homebrew, libjpeg, and optipng for HTML5 Boilerplate build tool use - optimization

Dipping my toe into command prompts.. totally lost.
I've installed Homebrew, and attempted to install libjpeg and optipng via brew install libjpeg optipngand have run into errors. I'm not sure how exactly to describe them.. so here's the code! I'm in Terminal on a Mac running OSX 10.6.7
Thank you SO much for the help.
1961:~ Daniel$ brew install libjpeg optipng
==> Downloading http://www.ijg.org/files/jpegsrc.v8c.tar.gz
File already downloaded and cached to /Users/Daniel/Library/Caches/Homebrew
==> ./configure --prefix=/usr/local/Cellar/jpeg/8c --disable-dependency-tracking
checking build system type... i386-apple-darwin10.7.3
checking host system type... i386-apple-darwin10.7.3
checking target system type... i386-apple-darwin10.7.3
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking for style of include used by make... none
checking for gcc... /usr/bin/cc
checking whether the C compiler works... no
configure: error: in `/private/tmp/homebrew-jpeg-8c-42or/jpeg-8c':
configure: error: C compiler cannot create executables
See `config.log' for more details
==> Exit Status: 77
http://github.com/mxcl/homebrew/blob/master/Library/Formula/jpeg.rb#L11
==> Environment
HOMEBREW_VERSION: 0.8
HEAD: (none)
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: 8-core 64-bit dunno
OS X: 10.6.7
Kernel Architecture: x86_64
Ruby: 1.8.7-174
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode:
GCC-4.0: N/A
GCC-4.2: N/A
LLVM: build 2335
MacPorts or Fink? false
X11 installed? true
==> Build Flags
CC: /usr/bin/cc
CXX: /usr/bin/c++
LD: /usr/bin/cc
CFLAGS: -O3 -w -pipe -arch i386 -arch x86_64
CXXFLAGS: -O3 -w -pipe -arch i386 -arch x86_64
LDFLAGS: -arch i386 -arch x86_64
MAKEFLAGS: -j8
Error: Failed executing: ./configure --prefix=/usr/local/Cellar/jpeg/8c --disable-dependency-tracking
Please report this bug: https://github.com/mxcl/homebrew/wiki/new-issue
These existing issues may help you:
https://github.com/mxcl/homebrew/issues/#issue/4442
It looks like an autotools configure failed.
Consider re-running the install with '-vd' to keep 'config.log' around:
brew install -vd jpeg
Gist 'config.log' and any error output when reporting an issue.
Remember to include your config information: brew --config
Also try:
`brew doctor` to check your setup for common problems.
`brew missing` to check installed packages for missing deps.
1961:~ Daniel$ brew doctor
We couldn't detect gcc 4.2.x. Some formulae require this compiler.
We couldn't detect gcc 4.0.x. Some formulae require this compiler.
/usr/bin is in your PATH before Homebrew's bin. This means that system-
provided programs will be used before Homebrew-provided ones. This is an
issue if you install, for instance, Python.
Consider editing your .bashrc to put:
/usr/local/bin
ahead of /usr/bin in your $PATH.
Some brews install binaries to sbin instead of bin, but Homebrew's
sbin was not found in your path.
Consider editing your .bashrc to add:
/usr/local/sbin
to $PATH.
"Git" was not found in your path.
Homebrew uses Git for several internal functions, and some formulae
use Git checkouts instead of stable tarballs.
You may want to do:
brew install git
You have an "autoconf" in your path blocking the system version at:
Custom autoconf in general and autoconf 2.66 in particular has issues
and will cause some Homebrew formulae to fail.
1961:~ Daniel$ brew install git
==> Downloading http://kernel.org/pub/software/scm/git/git-1.7.5.tar.bz2
######################################################################## 100.0%
==> make prefix=/usr/local/Cellar/git/1.7.5 install
==> Exit Status: 1
http://github.com/mxcl/homebrew/blob/master/Library/Formula/git.rb#L31
==> Environment
HOMEBREW_VERSION: 0.8
HEAD: (none)
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: 8-core 64-bit dunno
OS X: 10.6.7
Kernel Architecture: x86_64
Ruby: 1.8.7-174
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode:
GCC-4.0: N/A
GCC-4.2: N/A
LLVM: build 2335
MacPorts or Fink? false
X11 installed? true
==> Build Flags
CC: /usr/bin/cc
CXX: /usr/bin/c++
LD: /usr/bin/cc
CFLAGS: -O3 -w -pipe
CXXFLAGS: -O3 -w -pipe
MAKEFLAGS: -j8
Error: Failed executing: make prefix=/usr/local/Cellar/git/1.7.5 install
Please report this bug: https://github.com/mxcl/homebrew/wiki/new-issue
Also try:
`brew doctor` to check your setup for common problems.
`brew missing` to check installed packages for missing deps.
1961:~ Daniel$ brew missing
1961:~ Daniel$ brew doctor
We couldn't detect gcc 4.2.x. Some formulae require this compiler.
We couldn't detect gcc 4.0.x. Some formulae require this compiler.
/usr/bin is in your PATH before Homebrew's bin. This means that system-
provided programs will be used before Homebrew-provided ones. This is an
issue if you install, for instance, Python.
Consider editing your .bashrc to put:
/usr/local/bin
ahead of /usr/bin in your $PATH.
Some brews install binaries to sbin instead of bin, but Homebrew's
sbin was not found in your path.
Consider editing your .bashrc to add:
/usr/local/sbin
to $PATH.
"Git" was not found in your path.
Homebrew uses Git for several internal functions, and some formulae
use Git checkouts instead of stable tarballs.
You may want to do:
brew install git
You have an "autoconf" in your path blocking the system version at:
Custom autoconf in general and autoconf 2.66 in particular has issues
and will cause some Homebrew formulae to fail.

Try downloading and installing the Xcode development suite: http://developer.apple.com/xcode/
That will provide gcc (complier) to build the software

Related

Installing janus-gateway error on CentOS7

I want to install janus-gateway on CentOS7.
I read the following document and tried installation.
https://github.com/meetecho/janus-gateway/blob/master/README.md
git clone https://github.com/meetecho/janus-gateway.git
cd janus-gateway
sh autogen.sh
./configure --prefix=/opt/janus
However, configuring janus-gateway will cause an error. The error is as follows.
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for pkg-config... /bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for JANUS... no
configure: error: Package requirements (
glib-2.0 >= 2.34
libconfig
nice
jansson >= 2.5
libssl >= 1.0.1
libcrypto
) were not met:
No package 'nice' 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 JANUS_CFLAGS
and JANUS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
I installed libnice(libnice-0.1.3-4.el7.x86_64) in the following way.
yum install libnice
How can I solve it?
Thank you.
try this and rebuild
echo "export PKG_CONFIG_PATH=/usr/lib/pkgconfig" >> ~/.bashrc
source ~/.bashrc
Disclaimer: I am using Ubuntu 18.04 when testing this.
If you are using Ubuntu system and trying to install Janus and running this code
./configure --prefix=/opt/janus
And then getting this error: No package 'nice' found
Make sure you have been installation of the nice from aptitude.
sudo install aptitude
aptitude install libmicrohttpd-dev libjansson-dev \
libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev \
libopus-dev libogg-dev libcurl4-openssl-dev liblua5.3-dev \
libconfig-dev pkg-config gengetopt libtool automake
For some reason installation of nice using the answer from Frank, Ahmet or Zallfire doesn't work in Ubuntu. It has to be installed using aptitude.
You should download libnice source code to install.
https://gitlab.freedesktop.org/libnice/libnice
You need the development libnice.
yum install libnice-devel

Apache Httpd Build from source: fatal error: expat.h: No such file or directory

I am trying to build Apache Server v 2.4.38 on RHEL 7.3 and I am using apr 1.6.5, apr-util 1.6.1, and pcre 8.42.
I am running following commands
./configure --with-included-apr --with-pcre=/data/abc/installed/pcre_installed --prefix=/data/abc/installed/httpd_installed
make
While running 'make' I am receiving error
/bin/sh /data/abc/installed/httpd-2.4.38/srclib/apr/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/data/abc/installed/httpd-2.4.38/srclib/apr-util/include -I/data/abc/installed/httpd-2.4.38/srclib/apr-util/include/private -I/data/abc/installed/httpd-2.4.38/srclib/apr/include -o xml/apr_xml.lo -c xml/apr_xml.c && touch xml/apr_xml.lo
xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory
#include <expat.h>
Download expat-2.2.6.tar.bz2 from https://libexpat.github.io/.
Extract expat using following command
tar xvjf expat-2.2.6.tar.bz2 -C /path-to-dir
Change to the extracted expat directory.
Build expat using following commands
./configure --prefix=/path-to-expat-installation-dir
make
make install
While building Apache Httpd from source specify --with-expat
./configure --with-included-apr --prefix=/path-to-apache-installation --with-expat=/path-to-expat-installation-dir
For anyone else coming across this:
OP had to do this because they didn't have sudo access. If you do, usually you don't need to download the source of expat manually; installing via package manager is way easier. Unless the software you are compiling requires a newer version of expat than your RPM repos provide.
So for the RHEL family of OSes you can just do sudo <dnf|yum> install expat expat-devel, then proceed with what you were compiling.
Do you have the expat library installed? (Because that's where the expat.h comes from.)
https://libexpat.github.io/
If you cannot install it globally to the system, I'm sure Apache's ./configure script must have an option to support a custom location for the library as well.
Tried In Ubuntu
apt install libexpat1-dev
For RHEL, I would suggest #cyqsimon's answer

openssl / ctls trouble with vapor 2

How can I fix these OpenSSL / TLS issues I'm getting with Vapor 2? They are preventing me from compiling my project on the command line and in Xcode.
During SPM build:
note: you may be able to install ctls using your system-packager:
brew install ctls
note: you may be able to install ctls using your system-packager:
brew install openssl
Upon failure of SPM build:
Linking ./.build/debug/Run
ld: library not found for -lcrypto for architecture x86_64
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
error: exit(1): /Library/Developer/Toolchains/swift-3.1-DEVELOPMENT-SNAPSHOT-2017-03-07-a.xctoolchain/usr/bin/swift-build-tool -f /Users/tanner/Desktop/PackageConfig/.build/debug.yaml
Also in SPM:
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "shim.h"
^
/Users/tanner/Desktop/PackageConfigTwo/.build/checkouts/ctls.git-9210868160426949823/shim.h:4:10: error: 'openssl/conf.h' file not found
#include <openssl/conf.h>
^
/Users/tanner/Desktop/PackageConfigTwo/.build/checkouts/crypto.git-7980259129511365902/Sources/Crypto/Cipher/Cipher+Method.swift:1:8: error: could not build Objective-C module 'CTLS'
import CTLS
^
In Xcode:
/Users/tanner/PackageConfig/.build/checkouts/ctls.git-9210868160426949823/shim.h:4:10: 'openssl/conf.h' file not found
/Users/tanner/PackageConfig/.build/checkouts/crypto.git-7980259129511365902/Sources/Crypto/Cipher/Cipher+Method.swift:1:8: Could not build Objective-C module 'CTLS'
ld: library not found for -lssl
This error means OpenSSL is either not installed or not being properly linked. There are three solutions to this problem.
Option 1: Use Vapor Toolbox (Recommended)
Install the latest version of the Vapor toolbox.
If you have already installed the toolbox, try uninstalling it first:
which vapor
rm -rf /path/to/vapor
1.1 Install (macOS)
Add Vapor's Homebrew Tap
brew tap vapor/homebrew-tap
Update Homebrew and install the toolbox.
brew update
brew install vapor
1.2 Install (Ubuntu)
Add Vapor's APT repo.
Quick Script
eval "$(curl -sL https://apt.vapor.sh)"
Manual
wget -q https://repo.vapor.codes/apt/keyring.gpg -O- | sudo apt-key add -
echo "deb https://repo.vapor.codes/apt $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/vapor.list
Install
sudo apt-get update
sudo apt-get install vapor
1.3 Done
You should now have access to the vapor program and all required dependencies should be installed.
vapor build
vapor xcode
swift build and related commands should now also work normally.
swift build
swift package generate-xcodeproj
Option 2: Install Vapor's CTLS Package
2.1 Install (macOS)
Add Vapor's Homebrew Tap
brew tap vapor/homebrew-tap
Update Homebrew and install CTLS
brew update
brew install ctls
Restart your terminal, re-generate your Xcode project (if using Xcode), and try again.
2.2 Install (Ubuntu)
Add Vapor's APT repo.
Quick Script
eval "$(curl -sL https://apt.vapor.sh)"
Manual
wget -q https://repo.vapor.codes/apt/keyring.gpg -O- | sudo apt-key add -
echo "deb https://repo.vapor.codes/apt $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/vapor.list
Update APT and install CTLS.
sudo apt-get update
sudo apt-get install ctls
2.3 Done
swift build and other commands should now work normally.
Option 3: Manually Install and Link OpenSSL or Equivalent
3.1 Install (macOS)
Install OpenSSL (or any other similar SSL library)
brew install openssl
brew install libressl
3.2 Install (Ubuntu)
Install OpenSSL (or any other similar SSL library)
sudo apt-get install libssl-dev
3.3 Finding Linker Flags
You can use pkg-config (available on brew and apt) to find linker flags or most packages.
pkg-config <package-name> --cflags
pkg-config <package-name> --libs
However, OpenSSL installed through Homebrew cannot be linked and thus does not work with pkg-config. These flags should work:
include: /usr/local/opt/openssl/include
libs: /usr/local/opt/openssl/lib
Note, some libraries will be installed into /usr/include and /usr/lib which does not require explicit linker flags. OpenSSL through APT is installed this way.
3.4 Using Linker Flags
Linker flags can be added during swift build
swift build -Xswiftc -I/path/to/include -Xlinker -L/path/to/lib
They can also be added during Xcode project generation.
swift package -Xswiftc -I/path/to/include -Xlinker -L/path/to/lib generate-xcodeproj
#tanner0101 your suggestions here https://github.com/vapor/vapor/issues/937 have not resolved the issue for me. I get the CTLS is missing error not only on High Sierra but also on Ubuntu inside a Docker container.
The project is manually executable but MySQL does not work. I think that this https://github.com/vapor/vapor/issues/954 and this https://github.com/uchicago-cloud/mpcs51033-2017-spring-forum/issues/54 are not just deployment on Heroku issues.

install mlpy 3.5.0 on mac 10.9 error.Please help me

The following is the error which I am getting. Please help me to fix it.
apple:mlpy-3.5.0 apple$ python setup.py install
running install
running build
running build_py
running build_ext
building 'mlpy.gsl' extension
cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c mlpy/gsl/gsl.c -o build/temp.macosx-10.9-intel-2.7/mlpy/gsl/gsl.o
mlpy/gsl/gsl.c:223:10: fatal error: 'gsl/gsl_sf.h' file not found
#include "gsl/gsl_sf.h"
^
1 error generated.
MLPy depends on GNU Scientific Library (GSL), which you need to install first.
You can install it either with brew install gsl or manually from source.
For manual installation, instructions can be found here. The relevant steps are as follows:
go to: http://www.gnu.org/prep/ftp.html
click on an ftp link close to your location
find the gsl/ directory and click on it
find the gsl-VERSION.tar.gz file, where version is 1.14 or greater. Click on that file to download it.
In a terminal window extract the tar.gz file using tar -xzf gsl-VERSION.tar.gz and then cd to the ./gsl-VERSION directory
Look at the INSTALL file. It will probably tell you to run ./configure, then make, and then make install (and you might have to
login as the superuser (sudo)
I am actually getting the same issue today while installing mlpy. Based on the mlpy documentation. Here is the method to solve this issue.
According to the installation section in the mlpy documentation:
If the GSL header files or shared library are in non-standard locations on your system, use the --include-dirs
and --rpath options to build_ext:
$ python setup.py build_ext --include-dirs=/path/to/header --rpath=/path/to/lib
$ python setup.py install
We have to assign the header and lib. Based on How to obtain and install GSL,
Under Search Paths/Header Search Paths type /opt/local/include
Under Search Paths/Library Search Paths type /opt/local/lib
The quick answer is running the below command:
sudo python setup.py build_ext --include-dirs=/opt/local/include --rpath=/opt/local/lib
sudo python setup.py install
Hope this will be helpful.

brew install sshfs

I'm trying to install sshfs using homebrew. Any ideas on how to troubleshoot?
~/Desktop> brew install sshfs
==> Installing sshfs dependency: fuse4x
==> Downloading https://github.com/fuse4x/fuse/tarball/fuse4x_0_9_1
Already downloaded: /Library/Caches/Homebrew/fuse4x-0.9.1.tgz
==> autoreconf --force --install
aclocal: error: aclocal: file '/usr/local/share/aclocal/mysql.m4' does not exist
autoreconf: aclocal failed with exit status: 1
==> Build Environment
HOMEBREW_VERSION: 0.9.2
HEAD: e3d609903576d1902240532b27b8e136d93af42b
CPU: 8-core 64-bit ivybridge
OS X: 10.7.4-x86_64
Xcode: 4.3.3
CLT: 1.0.0.9000000000.1.1249367152
X11: 2.6.4 # /usr/X11
CC: /usr/bin/clang
CXX: /usr/bin/clang++ => /usr/bin/clang
LD: /usr/bin/clang
CFLAGS: -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.7 -arch i386 -arch x86_64
CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.7 -arch i386 -arch x86_64
CPPFLAGS: -I/usr/local/Cellar/gettext/0.18.1.1/include -I/usr/local/Cellar/libtool/2.4.2/include -I/usr/local/Cellar/automake/1.12.2/include -I/usr/local/Cellar/autoconf/2.69/include -isystem /usr/local/include
LDFLAGS: -L/usr/local/Cellar/gettext/0.18.1.1/lib -L/usr/local/Cellar/libtool/2.4.2/lib -L/usr/local/Cellar/automake/1.12.2/lib -L/usr/local/Cellar/autoconf/2.69/lib -L/usr/local/lib -arch i386 -arch x86_64
MACOSX_DEPLOYMENT_TARGET: 10.7
MAKEFLAGS: -j8
Error: Failed executing: autoreconf --force --install (fuse4x.rb:18)
These existing issues may help you:
https://github.com/mxcl/homebrew/issues/12266
https://github.com/mxcl/homebrew/issues/13647
Otherwise, this may help you fix or report the issue:
https://github.com/mxcl/homebrew/wiki/bug-fixing-checklist
~/Desktop> sudo brew install sshfs
Password:
Cowardly refusing to `sudo brew install'
It gave you two links to existing issues related to the error you are receiving. You should visit those links and see if they help you resolve the issue:
https://github.com/mxcl/homebrew/issues/12266
https://github.com/mxcl/homebrew/issues/13647
You should not be using sudo when installing things via homebrew.
I was having exactly the same problem and solved it by first running
brew update
as suggested here:
https://github.com/mxcl/homebrew/wiki/bug-fixing-checklist