Fail to upgrade ports-mgmt/pkg

hi. im new to this. does any know whats the error while im trying to upgrade ports-mgmt?
Code:
root@truenas[~]# cd /usr/ports/ports-mgmt/pkg/ && make install clean
===> Building/installing dialog4ports as it is required for the config dialog
sh: cc: not found
make[4]: "/usr/ports/Mk/Uses/compiler.mk" line 73: warning: "cc --version" returned non-zero status
make[4]: "/usr/ports/Mk/Uses/compiler.mk" line 121: warning: "c++ -### /dev/null 2>&1" returned non-zero status
sh: cc: not found
make[4]: "/usr/ports/Mk/Uses/objc.mk" line 23: warning: "cc --version" returnednon-zero status
sh: cc: not found
make[4]: "/usr/ports/Mk/Uses/compiler.mk" line 73: warning: "cc --version" returned non-zero status
make[4]: "/usr/ports/Mk/Uses/compiler.mk" line 121: warning: "c++ -### /dev/null 2>&1" returned non-zero status
sh: cc: not found
make[4]: "/usr/ports/Mk/Uses/objc.mk" line 23: warning: "cc --version" returnednon-zero status
===>  Cleaning for pkg-1.18.3
===>  Cleaning for dialog4ports-0.1.6_1
===>  License BSD2CLAUSE accepted by the user
===>   dialog4ports-0.1.6_1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by dialog4ports-0.1.6_1 for building
===>  Extracting for dialog4ports-0.1.6_1
=> SHA256 Checksum OK for dialog4ports-0.1.6.tar.gz.
===>  Patching for dialog4ports-0.1.6_1
===>  Applying FreeBSD patches for dialog4ports-0.1.6_1 from /usr/ports/ports-mgmt/dialog4ports/files
===>  Configuring for dialog4ports-0.1.6_1
===>  Building for dialog4ports-0.1.6_1
--- dialog4ports.o ---
--- mixedlist.o ---
--- dialog4ports.1.gz ---
--- dialog4ports.o ---
cc  -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -Wall -pedantic -c dialog4ports.c -o dialog4ports.o
--- mixedlist.o ---
cc  -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -Wall -pedantic -c mixedlist.c -o mixedlist.o
--- dialog4ports.1.gz ---
gzip -cn dialog4ports.1 > dialog4ports.1.gz
--- mixedlist.o ---
sh: cc: not found
--- dialog4ports.o ---
sh: cc: not found
--- mixedlist.o ---
*** [mixedlist.o] Error code 127

make[4]: stopped in /usr/ports/ports-mgmt/dialog4ports/work/dialog4ports-0.1.6
--- dialog4ports.o ---
*** [dialog4ports.o] Error code 127

make[4]: stopped in /usr/ports/ports-mgmt/dialog4ports/work/dialog4ports-0.1.6
2 errors

make[4]: stopped in /usr/ports/ports-mgmt/dialog4ports/work/dialog4ports-0.1.6
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/ports-mgmt/dialog4ports
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/ports-mgmt/dialog4ports

===> Options unchanged
===>  License BSD2CLAUSE accepted by the user
===> Fetching all distfiles required by pkg-1.18.3 for building
===>  Extracting for pkg-1.18.3
===>  License BSD2CLAUSE accepted by the user
===> Fetching all distfiles required by pkg-1.18.3 for building
=> SHA256 Checksum OK for freebsd-pkg-1.18.3_GH0.tar.gz.
===>  Patching for pkg-1.18.3
===>  Applying extra patch /usr/ports/ports-mgmt/pkg/files/extra-patch-docs_pkg.8
===>  Configuring for pkg-1.18.3
No installed jimsh or tclsh, building local bootstrap jimsh0
No working C compiler found. Tried cc and gcc.
===>  Script "configure" failed unexpectedly.
Please report the problem to pkg@FreeBSD.org [maintainer] and attach the
"/usr/ports/ports-mgmt/pkg/work/pkg-1.18.3/config.log" including the output
of the failure of your make command. Also, it might be a good idea to provide
an overview of all packages installed on your system (e.g. a
/usr/ports/ports-mgmt/pkg/work/pkg-1.18.3/src/pkg-static info -g -Ea).
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/ports-mgmt/pkg
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/ports-mgmt/pkg
*** Error code 1

Stop.
 
“No working C compiler found” seems to be the main issue.

What OS, what version, how did you install, did it use to work and now doesn’t or fresh install?
 
Any official FreeBSD release comes with a C compiler*). This might not be true for derived systems (like "truenas", as your hostname suggests).

If this isn't FreeBSD, it makes much more sense to ask on a forum about your actual system, there people might know what to do.

*) It's possible to build/install a FreeBSD base from source without one, but if you did that, you'd know it....
 
Back
Top