error while setting up chromium - build

i am getting following error while setting up chromium from source code.
when i run gn gen out/Default
gn gen out/Default
ERROR at //build/config/linux/pkg_config.gni:103:17: Script returned non-zero exit code.
pkgresult = exec_script(pkg_config_script, args, "value")
^----------
Current dir: /opt/apps/chromium/chromium_src/src/out/Default/
Command: python -- /opt/apps/chromium/chromium_src/src/build/config/linux/pkg-config.py -s /opt/apps/chromium/chromium_src/src/build/linux/debian_stretch_amd64-sysroot -a x64 nss -v -lssl3
Returned 1.
stderr:
Traceback (most recent call last):
File "/opt/apps/chromium/chromium_src/src/build/config/linux/pkg-config.py", line 232, in <module>
sys.exit(main())
File "/opt/apps/chromium/chromium_src/src/build/config/linux/pkg-config.py", line 139, in main
prefix = GetPkgConfigPrefixToStrip(options, args)
File "/opt/apps/chromium/chromium_src/src/build/config/linux/pkg-config.py", line 80, in GetPkgConfigPrefixToStrip
"--variable=prefix"] + args, env=os.environ)
File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
See //third_party/nss/BUILD.gn:15:3: whence it was called.
pkg_config("system_nss_no_ssl_config") {
^---------------------------------------
See //crypto/BUILD.gn:221:25: which caused the file to be included.
public_configs += [ "//third_party/nss:system_nss_no_ssl_config" ].
I am not able to make out how to fix this.
i followed https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions.md
also referred these
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-os-dev/360e3QsLH-8
https://groups.google.com/a/chromium.org/forum/#!msg/chromium-os-dev/nM7Af-sJP_I/YoqXPgZ0BQAJ
Not able to get much details.
These discussions refer to PKG_CONFIG_LIBDIR but its not clear where to set this value or use it exactly.
Any inputs on what i may be missing ?

I had the same issue resolved it by installing this packages
sudo apt-get update && sudo apt-get install pkg-config

I had the same issue, and I also tried with sudo apt-get update && sudo apt-get install pkg-config as mentioned by #Rajan Palani and many other git issues comments.
But in my case
sudo apt install libpango1.0-dev
sudo apt install libcogl-pango-dev
sudo apt install libjpeg-dev
above commands helps me out to solve the issue
source:
https://programmer.group/how_to_build_chromium_project_for_linux.html

Related

not installed requirements.txt on django project

I am new to programming and this is my first project
trying to start a django project on the server
activated virtual environment
after the pip install -r requirements.txt command, an error occurs
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 353, in run
wb.build(autobuilding=True)
File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepa re_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 554, in _prep are_file
require_hashes
File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 278, in p opulate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 465, in find_requir ement
all_candidates = self.find_all_candidates(req.name)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 423, in find_all_ca ndidates
for page in self._get_pages(url_locations, project_name):
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 795, in get_page
resp.raise_for_status()
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/m odels.py", line 935, in raise_for_status
raise HTTPError(http_error_msg, response=self)
HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/beatiful lsoup4/
Ok By watching at your problem i saw that there is a typo error in beautifulsoup4 library in requirements.txt file , and in comments as mentioned that u are also facing error in installing django
Could not find a version that satisfies the requirement Django==2.0.7 (from -r requirements.txt (line 3)) (from versions: (any versions) .No matching distribution found for Django==2.0.7 –
Django above 2 version support only python3 , so try
pip3 install django==2.0.7
if you have python3.5 and above in your system
Also to see supported versions by pip try:
pip install django==0
and
pip3 install django==0
make sure you are not using vpn.
What OS are you in? Make sure to have installed everything correctly, make the folders following official docs or maybe a tutorial, make sure to always use the right environment, in which Django has been properly installed via pip (I use pip3) Make sure before to have the latest version of Python supported (I use 3.8.2) and the latest version of pip. Make all the passages again and see what happens. If something goes wrong, be more detailed on what you've done.
Going over your problem again, I found that 2.0.7 indeed a correct version.
But in your requirements.txt its written as Django==2.0.7 that should be django==2.0.7

Pip does not work after upgrade to ubuntu-16.10

Running a command alongwith pip gives the following error. Even the command pip -V produces the following error.
I read that the error is due to setuptools version 31.0.0 and it should be lower than 28.0.0. But the version of my setuptools is 26.1.1 and it still gives the same error.
Traceback (most recent call last):
File "/usr/local/bin/pip", line 7, in
from pip import main
File "/usr/local/lib/python3.5/dist-packages/pip/__init__.py", line 26, in
from pip.utils import get_installed_distributions, get_prog
File "/usr/local/lib/python3.5/dist-packages/pip/utils/__init__.py", line 27, in
from pip._vendor import pkg_resources
File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 3018, in
#_call_aside
File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 3004, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 3046, in _initialize_master_working_set
dist.activate(replace=False)
File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2578, in activate
declare_namespace(pkg)
File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2152, in declare_namespace
_handle_ns(packageName, path_item)
File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2092, in _handle_ns
_rebuild_mod_path(path, packageName, module)
File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2121, in _rebuild_mod_path
orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'
The only solution I could find is reinstalling pip. Run these commands on your terminal
wget https://bootstrap.pypa.io/get-pip.py
sudo -H python get-pip.py --prefix=/usr/local/
However, this works only for pip, not pip3!
Upgrade your setuptools:
wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python3
Generally sudo combined with pip is considered harmful, avoid this when your system is not already broken.
Please refer to https://stackoverflow.com/a/48126778/7596504. The problem could be fixed by modifying your /usr/local/lib/python3.5/dist-packages/pip/_vendor/pkg_resources/__init__.py.

Python 2.6 or 2.7 setuptools > OSError - "Bootstra...sys.argv" = "setuptools failed with error code 1" > (Certbot-auto)

When trying to run "certbot-auto" for the first time instead of "letsencrypt-auto" to renew certificates on a server, it seems to fail with a couple of messages:
OSError: Command /root/.local/share/letsencrypt/bin/python2.7 -c "#!python
\"\"\"Bootstra...sys.argv[1:])
" --always-copy -U setuptools failed with error code 1
The default Python built into my CentOS is 2.6, but I also have an ALTINSTALL setup with Python 2.7.
I cannot make Python 2.7 my default distribution, as this then breaks YUM, and certbot-auto is not able to access "the EPEL repository needed" if YUM is not available.
I am not able to renew my certificates with Let's Encrypt, please, any and all help is greatly appreciated.
I ran this command:
./certbot-auto --verbose
It produced this output (with --verbose turned on):
Bootstrapping dependencies for RedHat-based OSes...
yum is /usr/bin/yum
To use Certbot, packages from the EPEL repository need to be installed.
Loaded plugins: security
Setting up Install Process
Package matching epel-release-6-7.noarch already installed. Checking for update.
Nothing to do
Loaded plugins: security
Setting up Install Process
Package gcc-4.4.6-3.el6.x86_64 already installed and latest version
Package dialog-1.1-9.20080819.1.el6.x86_64 already installed and latest version
Package augeas-libs-0.9.0-1.el6.x86_64 already installed and latest version
Package openssl-1.0.0-20.el6_2.5.x86_64 already installed and latest version
Package openssl-devel-1.0.0-20.el6_2.5.x86_64 already installed and latest version
Package libffi-devel-3.0.5-3.2.el6.x86_64 already installed and latest version
Package redhat-rpm-config-9.0.3-34.el6.noarch already installed and latest version
Package ca-certificates-2010.63-3.el6_1.5.noarch already installed and latest version
Package python-2.6.6-29.el6_2.2.x86_64 already installed and latest version
Package python-devel-2.6.6-29.el6_2.2.x86_64 already installed and latest version
Package python-virtualenv-1.7-1.el6.noarch already installed and latest version
Package python-tools-2.6.6-29.el6_2.2.x86_64 already installed and latest version
Package python-pip-0.8-1.el6.noarch already installed and latest version
Package 1:mod_ssl-2.2.15-15.el6.centos.1.x86_64 already installed and latest version
Nothing to do
Creating virtual environment...
Running virtualenv with interpreter /usr/local/bin/python2.7
The --no-site-packages flag is deprecated; it is now the default behavior.
New python executable in /root/.local/share/letsencrypt/bin/python2.7
Also creating executable in /root/.local/share/letsencrypt/bin/python
Installing setuptools..........................................
Complete output from command /root/.local/share/letsencrypt/bin/python2.7 -c "#!python
\"\"\"Bootstra...sys.argv[1:])
" --always-copy -U setuptools:
Downloading http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg
Searching for setuptools
Reading http://pypi.python.org/simple/setuptools/
Best match: setuptools 32.3.0
Downloading https://pypi.python.org/packages/b0/04/d7aac18d0d8b1b9bd9b88af02af8090e72653753bced3226f9903cabb991/setuptools-32.3.0.zip#md5=f72378b7152ad33d8a33a44d673f5794
Processing setuptools-32.3.0.zip
Running setuptools-32.3.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-hYCpVy/setuptools-32.3.0/egg-dist-tmp-0d8jk4
/usr/local/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'src_root'
warnings.warn(msg)
Traceback (most recent call last):
File "<string>", line 279, in <module>
File "<string>", line 214, in main
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1712, in main
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1716, in <lambda>
File "/usr/local/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 211, in run
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 446, in easy_install
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 476, in install_item
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 655, in install_eggs
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 930, in build_and_install
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 919, in run_setup
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/sandbox.py", line 62, in run_setup
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/sandbox.py", line 105, in run
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/sandbox.py", line 64, in <lambda>
File "setup.py", line 181, in <module>
File "/usr/local/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/dist.py", line 264, in __init__
File "/usr/local/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/dist.py", line 297, in finalize_options
File "/usr/bin/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1959, in load
ImportError: <module 'setuptools.dist' from '/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/dist.py'> has no 'check_specifier' attribute
----------------------------------------
...Installing setuptools...done.
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 2098, in <module>
main()
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 928, in main
never_download=options.never_download)
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 1040, in create_environment
search_dirs=search_dirs, never_download=never_download)
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 593, in install_setuptools
search_dirs=search_dirs, never_download=never_download)
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 567, in _install_req
cwd=cwd)
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 1006, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /root/.local/share/letsencrypt/bin/python2.7 -c "#!python
\"\"\"Bootstra...sys.argv[1:])
" --always-copy -U setuptools failed with error code 1
My operating system is (include version):
CentOS 6.2
Python 2.6 (needed for YUM)
Python 2.7 as "altinstall"
Apache/2.2.15
Setting Python 2.7 as default yields the following for YUM commands:
("no module named yum")

in virtual env, with centos and pip installed, I can't run a pip freeze

I have a program where I dearly need the dependency list, but pip freeze isn't working. I am running CentOS 7 and Python 2.7.5
The program runs on Python 2.4 (which I am doing as an alias in another terminal, yes, I did try the pip freeze from that terminal) and fortran95. I definitely have pip installed. I tried upgrading the Python2.7, but it says it is fine.
The the error from pip is as follows.
[root#localhost rotate6]# pip freeze
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args)
File "/usr/lib/python2.7/site-packages/pip/commands/freeze.py", line 85, in run
for line in freeze(**freeze_kwargs):
File "/usr/lib/python2.7/site-packages/pip/operations/freeze.py", line 47, in freeze
dependency_links
File "/usr/lib/python2.7/site-packages/pip/__init__.py", line 264, in from_dist
req = dist.as_requirement()
File "/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2562, in as_requirement
return Requirement.parse(spec)
File "/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2833, in parse
req, = parse_requirements(s)
File "/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2781, in parse_requirements
yield Requirement(line)
File "/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2790, in __init__
raise RequirementParseError(str(e))
RequirementParseError: Invalid requirement, parse error at "'-ipap11h'"
This is a known issue. See https://github.com/pypa/pip/issues/3764
The advice there is to try downgrading your version of pip to one that is less strict (some people find 8.1.0 works), or to uninstall the offending package, which appears to be _ipap11helper.

Decide which python version to use for pip and easy_install

I have two python versions on my server namely 2.4 and 2.7. It is running RHEL 5.8.
I already have pip and easy_install installed on my server.
When I try to install ipython using easy_install or pip, it gives me an error which probably does not support in python 2.4.
I want to use python 2.7 for both pip and easy_install since I would want to use the latest version of the both.
What should I do to have pip and easy_install use python 2.7. Python 2.4 is installed by default by the system and I do want to keep it.
Python 2.7 is installed at another location.
Below is the traceback both for easy_install and pip. Both end up in the same error. Any kind of help is appreciated.
PIP
ronak#ronak fun $ sudo pip install ipython
Downloading/unpacking ipython
Downloading ipython-0.13.zip (6.4Mb): 6.4Mb downloaded
Running setup.py egg_info for package ipython
Traceback (most recent call last):
File "<string>", line 14, in ?
File "/usr/local/home/ronak/fun/build/ipython/setup.py", line 23
from __future__ import print_function
SyntaxError: future feature print_function is not defined
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in ?
File "/usr/local/home/ronak/fun/build/ipython/setup.py", line 23
from __future__ import print_function
SyntaxError: future feature print_function is not defined
----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in /home/ronak/.pip/pip.log
EASY_INSTALL:
ronak#ronak $ sudo easy_install ipython
Searching for ipython
Reading http://pypi.python.org/simple/ipython/
Reading http://ipython.scipy.org
Reading http://ipython.scipy.org/dist
Reading http://ipython.scipy.org/dist/0.8.4
Reading http://ipython.scipy.org/dist/0.9.1
Reading http://ipython.org
Reading http://archive.ipython.org/release/0.12.1
Reading https://github.com/ipython/ipython/downloads
Reading http://ipython.scipy.org/dist/old/0.9
Reading http://ipython.scipy.org/dist/0.10
Reading http://archive.ipython.org/release/0.11/
Reading http://archive.ipython.org/release/0.12
Best match: ipython 0.13
Downloading https://github.com/downloads/ipython/ipython/ipython-0.13.zip
Processing ipython-0.13.zip
Running ipython-0.13/setup.py -q bdist_egg --dist-dir /tmp/easy_install-vgPLN2/ipython-0.13/egg-dist-tmp-GHUgsq
Traceback (most recent call last):
File "/usr/bin/easy_install", line 7, in ?
sys.exit(
File "/usr/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg/setuptools/command/easy_install.py", line 1712, in main
with_ei_usage(lambda:
File "/usr/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage
return f()
File "/usr/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg/setuptools/command/easy_install.py", line 1716, in <lambda>
distclass=DistributionWithoutHelpCommands, **kw
File "/usr/lib/python2.4/distutils/core.py", line 149, in setup
dist.run_commands()
File "/usr/lib/python2.4/distutils/dist.py", line 946, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command
cmd_obj.run()
File "/usr/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg/setuptools/command/easy_install.py", line 211, in run
self.easy_install(spec, not self.no_deps)
File "/usr/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg/setuptools/command/easy_install.py", line 446, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg/setuptools/command/easy_install.py", line 476, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg/setuptools/command/easy_install.py", line 655, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg/setuptools/command/easy_install.py", line 930, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg/setuptools/command/easy_install.py", line 919, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg/setuptools/sandbox.py", line 61, in run_setup
DirectorySandbox(setup_dir).run(
File "/usr/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg/setuptools/sandbox.py", line 105, in run
return func()
File "/usr/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg/setuptools/sandbox.py", line 64, in <lambda>
{'__file__':setup_script, '__name__':'__main__'}
File "setup.py", line 23
from __future__ import print_function
SyntaxError: future feature print_function is not defined
One way would be:
Open pip/easy_install in text editor
Check top line, it should say
#! /usr/bin/python
Change it to #!path/to/python2.7
You should check this SO question.
You may also want to consider using virtual environment through virtualenv and virtualenvwrapper to manage which version of Python your packages should use.
If you would like to easily install iPython, SciPy, MatPlotLib, etc. by downloading a .dmg, you can try here:
http://www.enthought.com/products/epd_free.php
Or if you have a academic email address:
http://www.enthought.com/products/edudownload.php
sudo /location/to/python2.7 /path/to/pip install ipython
If you have a recent version of pip, you an also try sudo pip-2.7 install ipython