# Syntax error occurs while "pkg install ja-font-hackgen"



## Kawamata (Oct 13, 2021)

Hello.  I am using FreeBSD 13.0-RELEASE-p4.
Following is the detail message.

Regards.

Fumio

```
$ sudo pkg install ja-font-hackgen
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    ja-font-hackgen: 2.5.1

Number of packages to be installed: 1

The process will require 84 MiB more space.

Proceed with this action? [y/N]: y
[1/1] Installing ja-font-hackgen-2.5.1...
/bin/sh: Syntax error: "(" unexpected (expecting ")")
pkg: PRE-INSTALL script failed
```
----------------------------------------------------------
At the first time, I executed "sudo pkg upgrade".
The package manager tried to upgrade ja-font-hackgen 2.3.2 to 2.5.1,
but it aborted by the Syntax error.
After update failed, I executed following commands.

```
sudo remove ja-font-hackgen
sudo pkg upgrade
sudo pkg install ja-font-hackgen
```


----------



## eternal_noob (Oct 13, 2021)

Do you use bash as a shell? If so try to to login as root and don't use sudo.


----------



## Kawamata (Oct 13, 2021)

Thank you.  Yes, I am using bash.  It also failed in sh shell.

```
# set|grep SHELL
SHELL=/bin/sh
# pkg install ja-font-hackgen

(snip)

[1/1] Installing ja-font-hackgen-2.5.1...
/bin/sh: Syntax error: "(" unexpected (expecting ")")
pkg: PRE-INSTALL script failed
#
```


----------



## SirDice (Oct 13, 2021)

That looks like a bad package, I get the same error:

```
[5/5] Installing ja-font-hackgen-2.5.1...
/bin/sh: Syntax error: "(" unexpected (expecting ")")
pkg: PRE-INSTALL script failed
```

You probably want to report that here: https://bugs.freebsd.org/bugzilla


----------



## Kawamata (Oct 13, 2021)

Reported. Thank you.

PR 259131


----------

