ubuntu安装python2.7出现python-minimal is already the newest version....解决方案

本文介绍了一种解决Python环境中的旧包损坏问题的方法。通过使用sudo apt-get install --reinstall python-minimal 和 sudo apt-get upgrade命令,可以有效地重新安装并更新Python的相关组件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

错误如上图:

解决方案如下:老的包可能损坏了,需要重新安装

sudo apt-get install --reinstall python-minimal
sudo apt-get upgrade


/content Mounted at /content/drive env: PYTHONDONTWRITEBYTECODE=1 env: TF_CPP_MIN_LOG_LEVEL=1 41 packages can be upgraded. Run 'apt list --upgradable' to see them. W: Skipping acquire of configured file 'main/source/Sources' as repository 'https://r2u.stat.illinois.edu/ubuntu jammy InRelease' does not seem to provide it (sources.list entry misspelt?) --2025-07-10 10:19:00-- https://github.com/camenduru/gperftools/releases/download/v1.0/libtcmalloc_minimal.so.4 Resolving github.com (github.com)... 140.82.113.4 Connecting to github.com (github.com)|140.82.113.4|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/669786276/620e2e64-be9f-4599-904f-18ee3811e159?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20250710%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250710T101901Z&X-Amz-Expires=1800&X-Amz-Signature=b5c26ca3d158bb5b88d2b09125b067e065003244102eeb42a1d86a5fc1b6c62e&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dlibtcmalloc_minimal.so.4&response-content-type=application%2Foctet-stream [following] --2025-07-10 10:19:01-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/669786276/620e2e64-be9f-4599-904f-18ee3811e159?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20250710%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250710T101901Z&X-Amz-Expires=1800&X-Amz-Signature=b5c26ca3d158bb5b88d2b09125b067e065003244102eeb42a1d86a5fc1b6c62e&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dlibtcmalloc_minimal.so.4&response-content-type=application%2Foctet-stream Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ... Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 373960 (365K) [application/octet-stream] Saving to: ‘/content/libtcmalloc_minimal.so.4’ /content/libtcmallo 100%[===================>] 365.20K --.-KB/s in 0.02s 2025-07-10 10:19:01 (15.2 MB/s) - ‘/content/libtcmalloc_minimal.so.4’ saved [373960/373960] env: LD_PRELOAD=/content/libtcmalloc_minimal.so.4 libcairo2-dev is already the newest version (1.16.0-5ubuntu2). python3-dev is already the newest version (3.10.6-1~22.04.1). python3-dev set to manually installed. The following packages were automatically installed and are no longer required: libbz2-dev libpkgconf3 libreadline-dev Use 'apt autoremove' to remove them. The following packages will be REMOVED: pkgconf r-base-dev The following NEW packages will be installed: aria2 libaria2-0 libc-ares2 pkg-config 0 upgraded, 4 newly installed, 2 to remove and 41 not upgraded. Need to get 1,561 kB of archives. After this operation, 5,430 kB of additional disk space will be used. (Reading database ... 126281 files and directories currently installed.) Removing r-base-dev (4.5.1-1.2204.0) ... dpkg: pkgconf: dependency problems, but removing anyway as you requested: libsndfile1-dev:amd64 depends on pkg-config; however: Package pkg-config is not installed. Package pkgconf which provides pkg-config is to be removed. libopencv-dev depends on pkg-config; however: Package pkg-config is not installed. Package pkgconf which provides pkg-config is to be removed. libmkl-dev:amd64 depends on pkg-config; however: Package pkg-config is not installed. Package pkgconf which provides pkg-config is to be removed. libjack-dev depends on pkg-config; however: Package pkg-config is not installed. Package pkgconf which provides pkg-config is to be removed. libgphoto2-dev:amd64 depends on pkg-config; however: Package pkg-config is not installed. Package pkgconf which provides pkg-config is to be removed. libglib2.0-dev:amd64 depends on pkg-config; however: Package pkg-config is not installed. Package pkgconf which provides pkg-config is to be removed. libfontconfig-dev:amd64 depends on pkg-config; however: Package pkg-config is not installed. Package pkgconf which provides pkg-config is to be removed. Removing pkgconf (1.8.0-1) ... Removing 'diversion of /usr/bin/pkg-config to /usr/bin/pkg-config.real by pkgconf' Removing 'diversion of /usr/share/aclocal/pkg.m4 to /usr/share/aclocal/pkg.real.m4 by pkgconf' Removing 'diversion of /usr/share/man/man1/pkg-config.1.gz to /usr/share/man/man1/pkg-config.real.1.gz by pkgconf' Removing 'diversion of /usr/share/pkg-config-crosswrapper to /usr/share/pkg-config-crosswrapper.real by pkgconf' Selecting previously unselected package pkg-config. (Reading database ... 126257 files and directories currently installed.) Preparing to unpack .../pkg-config_0.29.2-1ubuntu3_amd64.deb ... Unpacking pkg-config (0.29.2-1ubuntu3) ... Selecting previously unselected package libc-ares2:amd64. Preparing to unpack .../libc-ares2_1.18.1-1ubuntu0.22.04.3_amd64.deb ... Unpacking libc-ares2:amd64 (1.18.1-1ubuntu0.22.04.3) ... Selecting previously unselected package libaria2-0:amd64. Preparing to unpack .../libaria2-0_1.36.0-1_amd64.deb ... Unpacking libaria2-0:amd64 (1.36.0-1) ... Selecting previously unselected package aria2. Preparing to unpack .../aria2_1.36.0-1_amd64.deb ... Unpacking aria2 (1.36.0-1) ... Setting up libc-ares2:amd64 (1.18.1-1ubuntu0.22.04.3) ... Setting up pkg-config (0.29.2-1ubuntu3) ... Setting up libaria2-0:amd64 (1.36.0-1) ... Setting up aria2 (1.36.0-1) ... Processing triggers for man-db (2.10.2-1) ... Processing triggers for libc-bin (2.35-0ubuntu3.8) ... /sbin/ldconfig.real: /usr/local/lib/libtcm_debug.so.1 is not a symbolic link /sbin/ldconfig.real: /usr/local/lib/libtbbbind_2_0.so.3 is not a symbolic link /sbin/ldconfig.real: /usr/local/lib/libur_adapter_opencl.so.0 is not a symbolic link /sbin/ldconfig.real: /usr/local/lib/libtbbmalloc.so.2 is not a symbolic link /sbin/ldconfig.real: /usr/local/lib/libtbb.so.12 is not a symbolic link /sbin/ldconfig.real: /usr/local/lib/libtbbbind.so.3 is not a symbolic link /sbin/ldconfig.real: /usr/local/lib/libur_loader.so.0 is not a symbolic link /sbin/ldconfig.real: /usr/local/lib/libtbbbind_2_5.so.3 is not a symbolic link /sbin/ldconfig.real: /usr/local/lib/libhwloc.so.15 is not a symbolic link /sbin/ldconfig.real: /usr/local/lib/libur_adapter_level_zero.so.0 is not a symbolic link /sbin/ldconfig.real: /usr/local/lib/libumf.so.0 is not a symbolic link /sbin/ldconfig.real: /usr/local/lib/libtbbmalloc_proxy.so.2 is not a symbolic link /sbin/ldconfig.real: /usr/local/lib/libur_adapter_level_zero_v2.so.0 is not a symbolic link /sbin/ldconfig.real: /usr/local/lib/libtcm.so.1 is not a symbolic link The following packages were automatically installed and are no longer required: libbz2-dev libpkgconf3 libreadline-dev Use 'apt autoremove' to remove them. The following NEW packages will be installed: unionfs-fuse 0 upgraded, 1 newly installed, 0 to remove and 41 not upgraded. Need to get 48.7 kB of archives. After this operation, 146 kB of additional disk space will be used. Selecting previously unselected package unionfs-fuse. (Reading database ... 126346 files and directories currently installed.) Preparing to unpack .../unionfs-fuse_1.0-1ubuntu2_amd64.deb ... Unpacking unionfs-fuse (1.0-1ubuntu2) ... Setting up unionfs-fuse (1.0-1ubuntu2) ... Processing triggers for man-db (2.10.2-1) ... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.3/2.3 GB 444.7 kB/s eta 0:00:00 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.1/6.1 MB 89.3 MB/s eta 0:00:00 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 76.9 MB/s eta 0:00:00 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 16.6 MB/s eta 0:00:00 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.6/4.6 MB 78.7 MB/s eta 0:00:00 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.3/63.3 MB 11.3 MB/s eta 0:00:00 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.4/96.4 kB 3.0 MB/s eta 0:00:00 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. torchtune 0.6.1 requires torchdata==0.11.0, but you have torchdata 0.6.0 which is incompatible. ERROR: Could not find a version that satisfies the requirement xformers==0.0.19 (from versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.0.10, 0.0.11, 0.0.12, 0.0.13, 0.0.16rc424, 0.0.16rc425, 0.0.16, 0.0.20, 0.0.21, 0.0.22, 0.0.22.post7, 0.0.23, 0.0.23.post1, 0.0.24, 0.0.25, 0.0.25.post1, 0.0.26.post1, 0.0.27, 0.0.27.post1, 0.0.27.post2, 0.0.28, 0.0.28.post1, 0.0.28.post2, 0.0.28.post3, 0.0.29, 0.0.29.post1, 0.0.29.post2, 0.0.29.post3, 0.0.30, 0.0.31, 0.0.31.post1, 0.0.32.dev1062, 0.0.32.dev1064) ERROR: No matching distribution found for xformers==0.0.19 Failed to open /content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-additional-networks/models/lora/: No such file or directory. Aborting! /content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui Updating files: 100% (203/203), done. HEAD is now at 22bcc7be attempted fix for infinite loading for settings that some people experience Updating files: 100% (135/135), done. HEAD is now at cf1d67a Update modelcard.md HEAD is now at c202932 GRADIO_TUNNEL online Already up to date. Download Results: gid |stat|avg speed |path/URI ======+====+===========+======================================================= 20d2be|OK | 0B/s|/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/models/CLIP/ViT-L-14.pt Status Legend: (OK):download completed. Python 3.11.13 (main, Jun 4 2025, 08:57:29) [GCC 11.4.0] Commit hash: 22bcc7be428c94e9408f589966c2040187245d81 Installing gfpgan Installing clip Installing open_clip Installing xformers Traceback (most recent call last): File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/launch.py", line 355, in <module> prepare_environment() File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/launch.py", line 281, in prepare_environment run_pip(f"install {xformers_package}", "xformers") File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/launch.py", line 129, in run_pip return run(f'"{python}" -m pip {args} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/launch.py", line 97, in run raise RuntimeError(message) RuntimeError: Couldn't install xformers. Command: "/usr/bin/python3" -m pip install xformers==0.0.16rc425 --prefer-binary Error code: 1 stdout: Collecting xformers==0.0.16rc425 Downloading xformers-0.0.16rc425.tar.gz (7.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.3/7.3 MB 81.4 MB/s eta 0:00:00 Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Requirement already satisfied: torch>=1.12 in /usr/local/lib/python3.11/dist-packages (from xformers==0.0.16rc425) (2.0.0+cu118) Requirement already satisfied: numpy in /usr/local/lib/python3.11/dist-packages (from xformers==0.0.16rc425) (2.0.2) Collecting pyre-extensions==0.0.23 (from xformers==0.0.16rc425) Downloading pyre_extensions-0.0.23-py3-none-any.whl.metadata (4.0 kB) Collecting typing-inspect (from pyre-extensions==0.0.23->xformers==0.0.16rc425) Downloading typing_inspect-0.9.0-py3-none-any.whl.metadata (1.5 kB) Requirement already satisfied: typing-extensions in /usr/local/lib/python3.11/dist-packages (from pyre-extensions==0.0.23->xformers==0.0.16rc425) (4.14.1) Requirement already satisfied: filelock in /usr/local/lib/python3.11/dist-packages (from torch>=1.12->xformers==0.0.16rc425) (3.18.0) Requirement already satisfied: sympy in /usr/local/lib/python3.11/dist-packages (from torch>=1.12->xformers==0.0.16rc425) (1.13.1) Requirement already satisfied: networkx in /usr/local/lib/python3.11/dist-packages (from torch>=1.12->xformers==0.0.16rc425) (3.5) Requirement already satisfied: jinja2 in /usr/local/lib/python3.11/dist-packages (from torch>=1.12->xformers==0.0.16rc425) (3.1.6) Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.11/dist-packages (from torch>=1.12->xformers==0.0.16rc425) (2.0.0) Requirement already satisfied: cmake in /usr/local/lib/python3.11/dist-packages (from triton==2.0.0->torch>=1.12->xformers==0.0.16rc425) (3.31.6) Requirement already satisfied: lit in /usr/local/lib/python3.11/dist-packages (from triton==2.0.0->torch>=1.12->xformers==0.0.16rc425) (18.1.8) Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.11/dist-packages (from jinja2->torch>=1.12->xformers==0.0.16rc425) (3.0.2) Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.11/dist-packages (from sympy->torch>=1.12->xformers==0.0.16rc425) (1.3.0) Collecting mypy-extensions>=0.3.0 (from typing-inspect->pyre-extensions==0.0.23->xformers==0.0.16rc425) Downloading mypy_extensions-1.1.0-py3-none-any.whl.metadata (1.1 kB) Downloading pyre_extensions-0.0.23-py3-none-any.whl (11 kB) Downloading typing_inspect-0.9.0-py3-none-any.whl (8.8 kB) Downloading mypy_extensions-1.1.0-py3-none-any.whl (5.0 kB) Building wheels for collected packages: xformers Building wheel for xformers (setup.py): started Building wheel for xformers (setup.py): finished with status 'error' Running setup.py clean for xformers Failed to build xformers stderr: error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for xformers ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (xformers)
最新发布
07-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值