02 - Upgrading CyberPanel

How to fix this?
Without this fix I can not upgrade to fix a security issue of cyberpanel.

Collecting cloudflare==2.8.13 (from -r /usr/local/requirments.txt (line 5))
  Using cached cloudflare-2.8.13.tar.gz (65 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [45 lines of output]
      running egg_info
      creating /tmp/pip-pip-egg-info-659cu9_l/cloudflare.egg-info
      writing /tmp/pip-pip-egg-info-659cu9_l/cloudflare.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-pip-egg-info-659cu9_l/cloudflare.egg-info/dependency_links.txt
      writing entry points to /tmp/pip-pip-egg-info-659cu9_l/cloudflare.egg-info/entry_points.txt
      writing requirements to /tmp/pip-pip-egg-info-659cu9_l/cloudflare.egg-info/requires.txt
      writing top-level names to /tmp/pip-pip-egg-info-659cu9_l/cloudflare.egg-info/top_level.txt
      writing manifest file '/tmp/pip-pip-egg-info-659cu9_l/cloudflare.egg-info/SOURCES.txt'
      reading manifest file '/tmp/pip-pip-egg-info-659cu9_l/cloudflare.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE'
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-98zr7uwv/cloudflare_a9368bed35c441ca856bb09dfa544b70/setup.py", line 60, in <module>
          main()
        File "/tmp/pip-install-98zr7uwv/cloudflare_a9368bed35c441ca856bb09dfa544b70/setup.py", line 18, in main
          setup(
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 183, in setup
          return run_commands(dist)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
          dist.run_commands()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
          self.run_command(cmd)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/dist.py", line 991, in run_command
          super().run_command(command)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
          cmd_obj.run()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 315, in run
          self.find_sources()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 323, in find_sources
          mm.run()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 549, in run
          self.prune_file_list()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/command/sdist.py", line 161, in prune_file_list
          super().prune_file_list()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 380, in prune_file_list
          base_dir = self.distribution.get_fullname()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 267, in get_fullname
          return _distribution_fullname(self.get_name(), self.get_version())
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 285, in _distribution_fullname
          canonicalize_version(version, strip_trailing_zero=False),
      TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'
      [end of output]

I got same error:

2024-10-29 10:05:35 (146 MB/s) - ‘/usr/local/requirments.txt’ saved [613/613]

Collecting bcrypt==4.2.0 (from -r /usr/local/requirments.txt (line 1))
  Using cached bcrypt-4.2.0-cp39-abi3-manylinux_2_28_x86_64.whl.metadata (9.6 kB)
Collecting beautifulsoup4==4.12.3 (from -r /usr/local/requirments.txt (line 2))
  Using cached beautifulsoup4-4.12.3-py3-none-any.whl.metadata (3.8 kB)
Collecting boto3==1.34.153 (from -r /usr/local/requirments.txt (line 3))
  Using cached boto3-1.34.153-py3-none-any.whl.metadata (6.6 kB)
Collecting botocore==1.34.153 (from -r /usr/local/requirments.txt (line 4))
  Using cached botocore-1.34.153-py3-none-any.whl.metadata (5.7 kB)
Collecting cloudflare==2.8.13 (from -r /usr/local/requirments.txt (line 5))
  Using cached cloudflare-2.8.13.tar.gz (65 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [45 lines of output]
      running egg_info
      creating /tmp/pip-pip-egg-info-v54eep3t/cloudflare.egg-info
      writing /tmp/pip-pip-egg-info-v54eep3t/cloudflare.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-pip-egg-info-v54eep3t/cloudflare.egg-info/dependency_links.txt
      writing entry points to /tmp/pip-pip-egg-info-v54eep3t/cloudflare.egg-info/entry_points.txt
      writing requirements to /tmp/pip-pip-egg-info-v54eep3t/cloudflare.egg-info/requires.txt
      writing top-level names to /tmp/pip-pip-egg-info-v54eep3t/cloudflare.egg-info/top_level.txt
      writing manifest file '/tmp/pip-pip-egg-info-v54eep3t/cloudflare.egg-info/SOURCES.txt'
      reading manifest file '/tmp/pip-pip-egg-info-v54eep3t/cloudflare.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE'
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-octo9jne/cloudflare_a5c80bdc39f8421e81c9fbf1eafa340c/setup.py", line 60, in <module>
          main()
        File "/tmp/pip-install-octo9jne/cloudflare_a5c80bdc39f8421e81c9fbf1eafa340c/setup.py", line 18, in main
          setup(
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 183, in setup
          return run_commands(dist)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
          dist.run_commands()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
          self.run_command(cmd)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/dist.py", line 991, in run_command
          super().run_command(command)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
          cmd_obj.run()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 315, in run
          self.find_sources()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 323, in find_sources
          mm.run()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 549, in run
          self.prune_file_list()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/command/sdist.py", line 161, in prune_file_list
          super().prune_file_list()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 380, in prune_file_list
          base_dir = self.distribution.get_fullname()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 267, in get_fullname
          return _distribution_fullname(self.get_name(), self.get_version())
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 285, in _distribution_fullname
          canonicalize_version(version, strip_trailing_zero=False),
      TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
above command failed...

Ubuntu 22.04

2 Likes

Same here :slightly_smiling_face:

1 Like

Hello everyone.

What’s Going on?


My 40+ servers 100% cpu usage. 500+ websites down. Now I am feeling very very very great :slightly_smiling_face:

Did anyone get any resolution?

Thank You.

Same error here!!!
Please solve!

 × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [45 lines of output]
      running egg_info
      creating /tmp/pip-pip-egg-info-j0fzk0_8/cloudflare.egg-info
      writing /tmp/pip-pip-egg-info-j0fzk0_8/cloudflare.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-pip-egg-info-j0fzk0_8/cloudflare.egg-info/dependency_links.txt
      writing entry points to /tmp/pip-pip-egg-info-j0fzk0_8/cloudflare.egg-info/entry_points.txt
      writing requirements to /tmp/pip-pip-egg-info-j0fzk0_8/cloudflare.egg-info/requires.txt
      writing top-level names to /tmp/pip-pip-egg-info-j0fzk0_8/cloudflare.egg-info/top_level.txt
      writing manifest file '/tmp/pip-pip-egg-info-j0fzk0_8/cloudflare.egg-info/SOURCES.txt'
      reading manifest file '/tmp/pip-pip-egg-info-j0fzk0_8/cloudflare.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE'
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-78hc4hae/cloudflare_7a1cdaf7f65f4308866a81eeb5125b47/setup.py", line 60, in <module>
          main()
        File "/tmp/pip-install-78hc4hae/cloudflare_7a1cdaf7f65f4308866a81eeb5125b47/setup.py", line 18, in main
          setup(
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 183, in setup
          return run_commands(dist)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
          dist.run_commands()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
          self.run_command(cmd)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/dist.py", line 991, in run_command
          super().run_command(command)
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
          cmd_obj.run()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 315, in run
          self.find_sources()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 323, in find_sources
          mm.run()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 549, in run
          self.prune_file_list()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/command/sdist.py", line 161, in prune_file_list
          super().prune_file_list()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 380, in prune_file_list
          base_dir = self.distribution.get_fullname()
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 267, in get_fullname
          return _distribution_fullname(self.get_name(), self.get_version())
        File "/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 285, in _distribution_fullname
          canonicalize_version(version, strip_trailing_zero=False),
      TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'
      [end of output]

I am having the same problem,
I am not able to upgrade from v 2.3.5 to 2.38
Error is
adding license file ‘LICENSE’
Traceback (most recent call last):
File “”, line 2, in
File “”, line 34, in
File “/tmp/pip-install-0baityug/cloudflare_1c0409e9128b48298dbaef31c94b5d2f/setup.py”, line 60, in
main()
File “/tmp/pip-install-0baityug/cloudflare_1c0409e9128b48298dbaef31c94b5d2f/setup.py”, line 18, in main
setup(
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/init.py”, line 117, in setup
return distutils.core.setup(**attrs)
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/core.py”, line 183, in setup
return run_commands(dist)
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/core.py”, line 199, in run_commands
dist.run_commands()
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/dist.py”, line 954, in run_commands
self.run_command(cmd)
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/dist.py”, line 991, in run_command
super().run_command(command)
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/dist.py”, line 973, in run_command
cmd_obj.run()
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/command/egg_info.py”, line 315, in run
self.find_sources()
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/command/egg_info.py”, line 323, in find_sources
mm.run()
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/command/egg_info.py”, line 549, in run
self.prune_file_list()
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/command/sdist.py”, line 161, in prune_file_list
super().prune_file_list()
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py”, line 380, in prune_file_list
base_dir = self.distribution.get_fullname()
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_core_metadata.py”, line 267, in get_fullname
return _distribution_fullname(self.get_name(), self.get_version())
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_core_metadata.py”, line 285, in _distribution_fullname
canonicalize_version(version, strip_trailing_zero=False),
TypeError: canonicalize_version() got an unexpected keyword argument ‘strip_trailing_zero’
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
above command failed…

Can you please provide some help?

Thank you

Suddenly am seeing this error.
Note: Latest commit does not match, please upgrade CyberPanel


Is this the reason am getting this error when opening file manager?

And also I cannot login to my ssh.

Do you know more? Server also down here, no access to SSH and high cpu usage (100%). I wasn’t updating though.

Hello

You can check this: [URGENT] Cyberpanel ERROR 404 - #14 by usmannasir


I have recovered around 10-20 servers. But 20 more servers, The SSH Port is closed!

and Hetzner is the worst server team. I lost the complete access they said they have rescue mode but this thing got so many errors.

I am getting this error in chroot /mnt

/bin/bash: /lib64/ld-linux-x86-64.so.2: version GLIBC_2.35' not found (required by /lib/x86_64-linux-gnu/libc.so.6)

They said, they only provide network access issues or hardware issues. I am trying to take a backup and restore them to somewhere else. If you know a good one you guys can suggest me.

Thank You.

I resolved this error by installing cloudflare manually (python -m pip install --use-deprecated=legacy-resolver cloudflare==2.8.13), but then I get error with cffi package, and that I cannot install manually:

# pip install --only-binary :all: cffi==1.14.3
ERROR: Could not find a version that satisfies the requirement cffi==1.14.3 (from versions: 1.15.0rc1, 1.15.0rc2, 1.15.0, 1.15.1, 1.16.0rc1, 1.16.0rc2, 1.16.0, 1.17.0rc1, 1.17.0, 1.17.1)
ERROR: No matching distribution found for cffi==1.14.3

@usmannasir can you check this? ubuntu 22.04

What worked for me was switching to the root user by running sudo su. For some reason, certain packages just weren’t installing properly without being in root, likely due to permission issues or some environment-specific conflicts. Once I was in as root, I tried installing the package directly, like this:

pip install cloudflare==2.8.13

This actually installed just fine. But in case anyone else still runs into issues or gets dependency errors, you could try using the legacy resolver.

pip install --use-deprecated=legacy-resolver cloudflare==2.8.13

Going through these steps solved the problem for me, so if you’re hitting similar issues, try going to root and install it manually for the failed packages due to which the update is being stopped. Hope this helps!

root@djeneriki:~# sudo su pip install cloudflare==2.8.13
su: user pip does not exist
root@djeneriki:~# sudo su pip install --use-deprecated=legacy-resolver cloudflare==2.8.13
su: unrecognized option ‘–use-deprecated=legacy-resolver’
Try ‘su --help’ for more information.
root@djeneriki:~# pip install --use-deprecated=legacy-resolver cloudflare==2.8.1

@giannis78 I found solution. Take a look this article: Details and fix of recent security issue and patch of CyberPanel
and from there number 3. Package Metadata Issue on Ubuntu
Solution:
To address this, execute the following command:

wget -O- https://raw.githubusercontent.com/shbs9/CPupgradebash/refs/heads/main/ubuntufix.sh | bash

at least this fixed my issue

1 Like

Vultr has warned me about the issue. I have used these codes on cyberpanel page Exou has shared in order to fix the permission error and ubuntu sub process errors during metadata generation.

Then I tried to upgrade using this below without specifying a version:

sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)

I see lots of this this line below. After the update is over the panel is the same. 2.3.

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.

When I start to update to specific version, terminal is trying to download something and it stops in there.

Any solution?

I solved with this:

sudo pip install packaging==22

and launch update again

1 Like

That helped me too update. Thank you.

hello
I having problem with the below command when upgrading to the latest version of CyberPanel.
I using root user.
please help me

upgrade command:

sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)

problem during upgrade:

Using cached https://files.pythonhosted.org/packages/6c/be/4e32d02bf08b8f76bf6e59f2a531690c1e4264530404501f3489ca975d9a/protobuf-4.21.0-py2.py3-none-any.whl
protobuf requires Python ‘>=3.7’ but the running Python is 3.6.8
above command failed…
[root@srv ~]#

I have been using cyberpanel_utility to do all my upgrading tasks. Which method is the preferred method to upgrade?

To upgrade from 2.3.6 and 2.3.7 up to the current latest 2.3.8 it would be best to do it this way in SSH:

wget https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.3.8/cyberpanel_upgrade.sh
chmod +x cyberpanel_upgrade.sh
./cyberpanel_upgrade.sh