Update to 1.5.10
-
I have looked over the previous similar posts but have not found my solution as of yet.
CentOS 7
Fog 1.5.9
Using Git
When I run installfog.sh I get the following:installfog.sh: line 399: syntax error near unexpected token `>' installfog.sh: line 399: ` exec &> >(tee -a "$workingdir/error_logs/foginstall.log")'
/error_logs/fog_error_1.5.10.log:
/usr/bin/lsb_release /usr/bin/systemctl systemd ln: failed to create symbolic link '/usr/lib/systemd/system/mysql.service': File exists ln: failed to create symbolic link '/etc/systemd/system/mysql.service': File exists
I’m stuck here.
-
@bballmcoe This part of the installer script has not changed in a long time as far as I know. Maybe the shell used is causing this?! Please post the output of the following commands:
ps -p $$ echo $0 echo $SHELL
-
@Sebastian-Roth said in Update to 1.5.10:
As Requested:
[root@fog bin]# ps -p $$ PID TTY TIME CMD 102699 pts/0 00:00:00 bash [root@fog bin]# echo $0 -bash [root@fog bin]# echo $SHELL /bin/bash
-
@bballmcoe said:
When I run installfog.sh I get the following:
Can you please post the exact command(s) you use to hit this error?
Searching the web for the mentioned error brings me to the same point. Looks like the script is not being run with bash.
As well check out if this is really a bash shell or something else. Run the following commands and post output here:
/bin/bash --version ls -al /bin/bash which bash ls -al $(which bash)
-
[root@fog bin]# sh installfog.sh
Installing LSB_Release as needed- Attempting to get release information…Done
installfog.sh: line 399: syntax error near unexpected token>' installfog.sh: line 399:
exec &> >(tee -a “$workingdir/error_logs/foginstall.log”)’
[root@fog bin]#
- Attempting to get release information…Done
-
/bin/bash --version
GNU bash, version 4.4.20(1)-release (x86_64-redhat-linux-gnu)]# ls -al /bin/bash
-rwxr-xr-x. 1 root root 1150560 Apr 7 2022 /bin/bashwhich bash
/usr/bin/bashls -al $(which bash)
-rwxr-xr-x. 1 root root 1150560 Apr 7 2022 /usr/bin/bash -
@bballmcoe I haven’t used CentOS 7 in a while so unless this is a CentOS quirk that I don’t remember, you are running the install script using
shell
notbash
.
Try running the installer like this:./installfog.sh
orbash installfog.sh
-
Ding, ding, ding, we have a winner! Looks like that did it. Thanks everyone.
-
@bballmcoe Glad this is fixed and working, but can I ask why you were running the command with
sh installfog.sh
?I’m not aware anywhere in documentation that we tell people to do that.
-
@Tom-Elliott
Habit, simply habit. I looked back at the wiki documentation and it definitely does not say to use sh. I do apologize for the confusion and hopefully this helps someone in the future. -