Syntax error while executing any brew command - homebrew

Error:
/usr/local/bin/brew: line 1: syntax error near unexpected token '<<<'
/usr/local/bin/brew: line 1: '<<<<<<< 61ffa47gd9dc179ddff792db1dc6f55464f6c16b'
I tried removing and adding closing triangular brackets but neither one worked for me.
I found some similar questions/answers related to this where unexpected token was ')', but they didn't help.

This is an unresolved git conflict. Run the following command and you’ll be fine:
cd /usr/local && git fetch && git reset --hard origin/master

Seems to be similar issue than Homebrew on Mac OS X (El Capitan): syntax error near unexpected token `{
dos2unix /usr/local/bin/brew

Related

Cardano-node nix-build error: attribute 'ff' in selection path 'scripts.ff.node' not found

Using the recommended nix build method from this guide for a cardano-node from scratch (on Debian or Ubuntu latest) running this command:
$ nix-build -A scripts.ff.node -o ff-node-local
I get the following error:
error: attribute 'ff' in selection path 'scripts.ff.node' not found
To get past that error, try using a more updated guide here, and run the following nix-build command instead:
nix-build -A scripts.mainnet.node -o mainnet-node-local

ImageMagic gives ' delegate failed `'ufraw-batch' '

{ Error: Command failed: identify: delegate failed `'ufraw-batch' --silent --create-id=also --out-type=png --out-depth=16 '--output=%u.png' '%i'' # error/delegate.c/InvokeDelegate/1919.
identify: unable to open image `/tmp/magick-53080Z_JGYvtuPOl8.ppm': No such file or directory # error/blob.c/OpenBlob/2841.
I got an issue while working with ImageMagick in my node application I did the search but can't get the proper solution for my problem.
Edit: ufraw is no longer maintained, so use at your own risk and see dcraw alternative lower down.
You need to install 'ufraw-batch'
sudo apt-get install ufraw-batch
If this does not work, as it did for me. I got a "Segmentation fault (core dumped)"
This seems to be common problem with ufraw: https://sourceforge.net/p/ufraw/bugs/
It does not seem to get update much anymore, at least not in the main repos.
Converting RAW image into other types of image you can use DCRaw (it is also used by UFRaw).
Here is an example to convert a .cr2 image to a .png:
dcraw -c -w "./IMG_1.CR2" | pnmtopng > "./IMG_1.png";
Macos:
brew install ufraw
Solved it for me

Cannot compile Open CV on Ubuntu 18.04 because of jasper.h not found

I am trying to compile Opencv on Ubuntu 18.04. I installed many dependencies packages but when I run make I get the error:
grfmt_jpeg2000.cpp:59:10: fatal error: jasper/jasper.h: No such file or directory
#include <jasper/jasper.h>
^~~~~~~~~~~~~~~~~
compilation terminated.
I had already jasper installed and installed libjasperreports-java. However the file jasper.h cannot still be found in my system. Is there any library I can install with apt install to get that file? Or am I missing any other library?
EDIT 1
I tried also downloading the opencv_contrib to install extra moduels of openCV but first of all jaspar is not present and secondly setting the build with
cmake -D CMAKE_INSTALL_PREFIX=./ -D CMAKE_BUILD_TYPE=Debug -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ../openCV
returns the error:
Make Error at cmake/OpenCVModule.cmake:352 (message):
Duplicated modules NAMES has been found
while CMakeError.log contains many errors of the type:
Build output check failed:
Regex: 'command line option .* is valid for .* but not for C\+\+'
Output line: 'cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++'

syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE)

I am using laravel5.0 on centos 6.9, when I try to run php artisan migarate , getting error PHP Parse error:
syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /root/.local/share/Trash/files/keystone_laravel.2/laravel/artisan on line 3
please anyone help
Change the version of your php for L5.0 you need to install a
PHP >= 5.4, PHP < 7
https://laravel.com/docs/5.0
I'm using Laravel5.4 and CentOS7.4, and PHP5.4 pre-installed into the system, but I installed php7.0 manually by source-code without link it to /usr/bin so when I run php artisan schedule:run, it actually run the command with php5.4, and of course I get the same error. So I link php7.0 to /usr/bin to make it as default php, then I fixed it.

Xcode Build error, arm-apple-darwin11-gcc-4.2.1 execvp: No such file or directory

After upgrading to Xcode 4.3.2. I'm getting a metric ton of build errors.
A whole line of them are error code 255
gcc-4.2: error trying to exec '/usr/bin/arm-apple-darwin11-gcc-4.2.1': execvp: No such file or directory
Command /usr/bin/gcc-4.2 failed with exit code 255
I noticed that there is no /usr/bin/arm-apple-darwin11-gcc-4.2.1 file on my machine. Could this be the source of the problem?
What's the output of this command?
$ printenv | grep "CC="
It might be honoring your C Compiler (CC) selection. I was getting similar errors (through cocoapods) and doing an
$ export CC=
fixed it for me.

Resources