chromium build error gn gen out/Default in Ubuntu

When I’m setting up the build I’m getting the error in Ubuntu, I’m pasting my error shown in terminal here (Note: /home/quic/ is my home directory)

when i type gn gen out/Default it get the following error

`quic@quic:\~/chromium/src$ gn gen out/my_build
ERROR at //build/config/linux/pkg_config.gni:104:17: Script returned non-zero exit code.
pkgresult = exec_script(pkg_config_script, args, "value")
Current dir: /home/quic/chromium/src/out/my_build/
Command: python3 /home/quic/chromium/src/build/config/linux/ -s /home/quic/chromium/src/build/linux/debian_bullseye_amd64-sysroot -a x64 xkbcommon
Returned 1.

Traceback (most recent call last):
File "/home/quic/chromium/src/build/config/linux/", line 248, in \<module\>
File "/home/quic/chromium/src/build/config/linux/", line 143, in main
prefix = GetPkgConfigPrefixToStrip(options, args)
File "/home/quic/chromium/src/build/config/linux/", line 81, in GetPkgConfigPrefixToStrip
prefix = subprocess.check_output(\[options.pkg_config,
File "/usr/lib/python3.10/", line 420, in check_output
return run(\*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.10/", line 501, in run
with Popen(\*popenargs, \*\*kwargs) as process:
File "/usr/lib/python3.10/", line 966, in __init__
self.\_execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/", line 1842, in \_execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: \[Errno 2\] No such file or directory: 'pkg-config'

See //ui/events/ozone/layout/ whence it was called.
pkg_config("xkbcommon") {
See //ui/events/ which caused the file to be included.
deps += \[ "//ui/events/ozone/layout" \]

Read more here: Source link