Unable to find expected entry 'partner/binary-i38/Packages /binary-i386sudo

本文详细描述了如何解决Ubuntu系统更新时遇到的奇怪架构问题。通过使用`dpkg --print-foreign-architectures`查找并删除多余的架构设置,成功解决了W:Failed to fetch错误。关键在于识别并删除不正确的架构描述,从而避免了更新过程中的故障。

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

今天下午被一个update的问题,让我找了半天的解决方法。 sudo apt-get update 莫名奇妙地出现了这个错误


W: Failed to fetch http://mirrors.ustc.edu.cn/ubuntu/dists/trusty/Release  Unable to find expected entry 'main/binary-i386sudo/Packages' in Release file (Wrong sources.list entry or malformed file)

https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1328186)上面发现了解决办法:找了半天都没有找到有遇到过这种类似问题的人,google了半天,最后想想,其实binary-i386sudo特别奇葩,显然是哪个地方输错了,我一直觉得是哪个地方莫名奇妙多了entry,然后又开始准备看下apt-get update 的原理。庆幸让我发现了一个类似的奇葩binary-i38,某个人竟然遇到了这种类似的错误。再google一下 binary-i38 类似的问题。在这个帖子https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1328186

他的错误是:

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/utopic-security/Release Unable to find expected entry 'main/binary-i38/Packages' in Release file (Wrong sources.list entry or malformed file)

W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/utopic/Release Unable to find expected entry 'universe/binary-i38/Packages' in Release file (Wrong sources.list entry or malformed file)


解决办法:

On my system helps this:
> dpkg --print-foreign-architectures
it returns:
> i386
> i38


then delete wrong "i38" architecture:
> dpkg --remove-architecture i38

找出机器中有的architectures,发现多了一个i386sudo,它的是i38。然后删除这个架构就好了。

其实就是莫名奇妙添加错了架构。认真思考,从问题中发现诡异之处。然后就能够找到解决办法了。

(timbrewatermark) root@autodl-container-5e64478fe3-5fbcb1e5:~/autodl-tmp/TimbreWatermarking-main/watermarking_model# pip install pypesq==1.2.4 Looking in indexes: http://mirrors.aliyun.com/pypi/simple Collecting pypesq==1.2.4 Using cached http://mirrors.aliyun.com/pypi/packages/c7/e7/97ef80281de134be48b352bb63218a5f92f96c5bce32f37e8e288d253eff/pypesq-1.2.4.tar.gz (30 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: numpy in /root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages (from pypesq==1.2.4) (1.24.2) Building wheels for collected packages: pypesq Building wheel for pypesq (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [103 lines of output] /root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/setuptools/installer.py:34: UserWarning: Module numpy was already imported from /root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/numpy/__init__.py, but /tmp/pip-install-b4hzkb01/pypesq_e9848519956f4b538b2373b159e56aef is being added to sys.path import pkg_resources # Delay import to avoid unnecessary side-effects /root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/setuptools/__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !! ******************************************************************************** Requirements should be satisfied by a PEP 517 installer. If you are using pip, you can try `pip install --use-pep517`. ******************************************************************************** !! dist.fetch_build_eggs(dist.setup_requires) running bdist_wheel running build running build_py file numpy.py (for module numpy) not found creating build/lib.linux-x86_64-cpython-38/pypesq copying pypesq/__init__.py -> build/lib.linux-x86_64-cpython-38/pypesq file numpy.py (for module numpy) not found running build_ext building 'pesq_core' extension creating build/temp.linux-x86_64-cpython-38/pypesq gcc -pthread -B /root/miniconda3/envs/timbrewatermark/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ipypesq -I/root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/numpy/core/include/numpy -I/root/miniconda3/envs/timbrewatermark/include/python3.8 -I/root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/numpy/core/include -c pypesq/dsp.c -o build/temp.linux-x86_64-cpython-38/pypesq/dsp.o gcc -pthread -B /root/miniconda3/envs/timbrewatermark/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ipypesq -I/root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/numpy/core/include/numpy -I/root/miniconda3/envs/timbrewatermark/include/python3.8 -I/root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/numpy/core/include -c pypesq/pesq.c -o build/temp.linux-x86_64-cpython-38/pypesq/pesq.o In file included from /root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1940, from /root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12, from /root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5, from pypesq/pesq.c:2: /root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] 17 | #warning "Using deprecated NumPy API, disable it with " \ | ^~~~~~~ pypesq/pesq.c: In function ‘_pesq’: pypesq/pesq.c:61:34: warning: passing argument 1 of ‘compute_pesq’ from incompatible pointer type [-Wincompatible-pointer-types] 61 | float pesq = compute_pesq(ref->data, deg->data, ref->dimensions[0], deg->dimensions[0], fs); | ~~~^~~~~~ | | | char * In file included from pypesq/pesq.c:5: pypesq/pesq.h:287:28: note: expected ‘short int *’ but argument is of type ‘char *’ 287 | float compute_pesq(short * ref, short * deg, long ref_n_samples, long deg_n_samples, long fs); | ~~~~~~~~^~~ pypesq/pesq.c:61:45: warning: passing argument 2 of ‘compute_pesq’ from incompatible pointer type [-Wincompatible-pointer-types] 61 | float pesq = compute_pesq(ref->data, deg->data, ref->dimensions[0], deg->dimensions[0], fs); | ~~~^~~~~~ | | | char * In file included from pypesq/pesq.c:5: pypesq/pesq.h:287:41: note: expected ‘short int *’ but argument is of type ‘char *’ 287 | float compute_pesq(short * ref, short * deg, long ref_n_samples, long deg_n_samples, long fs); | ~~~~~~~~^~~ gcc -pthread -B /root/miniconda3/envs/timbrewatermark/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ipypesq -I/root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/numpy/core/include/numpy -I/root/miniconda3/envs/timbrewatermark/include/python3.8 -I/root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/numpy/core/include -c pypesq/pesqdsp.c -o build/temp.linux-x86_64-cpython-38/pypesq/pesqdsp.o gcc -pthread -B /root/miniconda3/envs/timbrewatermark/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ipypesq -I/root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/numpy/core/include/numpy -I/root/miniconda3/envs/timbrewatermark/include/python3.8 -I/root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/numpy/core/include -c pypesq/pesqio.c -o build/temp.linux-x86_64-cpython-38/pypesq/pesqio.o pypesq/pesqio.c: In function ‘load_src’: pypesq/pesqio.c:200:10: warning: unused variable ‘s’ [-Wunused-variable] 200 | char s; | ^ pypesq/pesqio.c:198:10: warning: unused variable ‘count’ [-Wunused-variable] 198 | long count; | ^~~~~ pypesq/pesqio.c:196:10: warning: unused variable ‘to_read’ [-Wunused-variable] 196 | long to_read; | ^~~~~~~ gcc -pthread -B /root/miniconda3/envs/timbrewatermark/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ipypesq -I/root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/numpy/core/include/numpy -I/root/miniconda3/envs/timbrewatermark/include/python3.8 -I/root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/numpy/core/include -c pypesq/pesqmain.c -o build/temp.linux-x86_64-cpython-38/pypesq/pesqmain.o pypesq/pesqmain.c: In function ‘compute_pesq’: pypesq/pesqmain.c:118:10: warning: unused variable ‘names’ [-Wunused-variable] 118 | int names = 0; | ^~~~~ pypesq/pesqmain.c: In function ‘pesq_measure’: pypesq/pesqmain.c:405:25: warning: variable ‘end’ set but not used [-Wunused-but-set-variable] 405 | long start, end; | ^~~ pypesq/pesqmain.c:405:18: warning: variable ‘start’ set but not used [-Wunused-but-set-variable] 405 | long start, end; | ^~~~~ pypesq/pesqmain.c:242:9: warning: unused variable ‘i’ [-Wunused-variable] 242 | int i; | ^ pypesq/pesqmain.c:404:12: warning: ‘resultsFile’ may be used uninitialized [-Wmaybe-uninitialized] 404 | if (resultsFile != NULL) { | ^ gcc -pthread -B /root/miniconda3/envs/timbrewatermark/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ipypesq -I/root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/numpy/core/include/numpy -I/root/miniconda3/envs/timbrewatermark/include/python3.8 -I/root/miniconda3/envs/timbrewatermark/lib/python3.8/site-packages/numpy/core/include -c pypesq/pesqmod.c -o build/temp.linux-x86_64-cpython-38/pypesq/pesqmod.o pypesq/pesqmod.c: In function ‘utterance_split’: pypesq/pesqmod.c:298:10: warning: variable ‘Utt_Delay’ set but not used [-Wunused-but-set-variable] 298 | long Utt_Delay; | ^~~~~~~~~ pypesq/pesqmod.c: In function ‘pesq_psychoacoustic_model’: pypesq/pesqmod.c:806:13: warning: variable ‘peak’ set but not used [-Wunused-but-set-variable] 806 | float peak; | ^~~~ pypesq/pesqmod.c:782:24: warning: variable ‘power_deg’ set but not used [-Wunused-but-set-variable] 782 | float power_ref, power_deg; | ^~~~~~~~~ pypesq/pesqmod.c:782:13: warning: variable ‘power_ref’ set but not used [-Wunused-but-set-variable] 782 | float power_ref, power_deg; | ^~~~~~~~~ g++ -pthread -B /root/miniconda3/envs/timbrewatermark/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -pthread -shared -B /root/miniconda3/envs/timbrewatermark/compiler_compat -L/root/miniconda3/envs/timbrewatermark/lib -Wl,-rpath=/root/miniconda3/envs/timbrewatermark/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-cpython-38/pypesq/dsp.o build/temp.linux-x86_64-cpython-38/pypesq/pesq.o build/temp.linux-x86_64-cpython-38/pypesq/pesqdsp.o build/temp.linux-x86_64-cpython-38/pypesq/pesqio.o build/temp.linux-x86_64-cpython-38/pypesq/pesqmain.o build/temp.linux-x86_64-cpython-38/pypesq/pesqmod.o -o build/lib.linux-x86_64-cpython-38/pesq_core.cpython-38-x86_64-linux-gnu.so /root/miniconda3/envs/timbrewatermark/compiler_compat/ld: build/temp.linux-x86_64-cpython-38/pypesq/pesqdsp.o:/tmp/pip-install-b4hzkb01/pypesq_e9848519956f4b538b2373b159e56aef/pypesq/pesq.h:143: multiple definition of `Nb'; build/temp.linux-x86_64-cpython-38/pypesq/pesq.o:/tmp/pip-install-b4hzkb01/pypesq_e9848519956f4b538b2373b159e56aef/pypesq/pesq.h:143: first defined here /root/miniconda3/envs/timbrewatermark/compiler_compat/ld: build/temp.linux-x86_64-cpython-38/pypesq/pesqio.o:/tmp/pip-install-b4hzkb01/pypesq_e9848519956f4b538b2373b159e56aef/pypesq/pesq.h:143: multiple definition of `Nb'; build/temp.linux-x86_64-cpython-38/pypesq/pesq.o:/tmp/pip-install-b4hzkb01/pypesq_e9848519956f4b538b2373b159e56aef/pypesq/pesq.h:143: first defined here /root/miniconda3/envs/timbrewatermark/compiler_compat/ld: build/temp.linux-x86_64-cpython-38/pypesq/pesqmain.o:/tmp/pip-install-b4hzkb01/pypesq_e9848519956f4b538b2373b159e56aef/pypesq/pesq.h:143: multiple definition of `Nb'; build/temp.linux-x86_64-cpython-38/pypesq/pesq.o:/tmp/pip-install-b4hzkb01/pypesq_e9848519956f4b538b2373b159e56aef/pypesq/pesq.h:143: first defined here /root/miniconda3/envs/timbrewatermark/compiler_compat/ld: build/temp.linux-x86_64-cpython-38/pypesq/pesqmod.o:/tmp/pip-install-b4hzkb01/pypesq_e9848519956f4b538b2373b159e56aef/pypesq/pesq.h:143: multiple definition of `Nb'; build/temp.linux-x86_64-cpython-38/pypesq/pesq.o:/tmp/pip-install-b4hzkb01/pypesq_e9848519956f4b538b2373b159e56aef/pypesq/pesq.h:143: first defined here /root/miniconda3/envs/timbrewatermark/compiler_compat/ld: build/temp.linux-x86_64-cpython-38/pypesq/pesqmod.o:/tmp/pip-install-b4hzkb01/pypesq_e9848519956f4b538b2373b159e56aef/pypesq/pesqpar.h:123: multiple definition of `InIIR_Nsos'; build/temp.linux-x86_64-cpython-38/pypesq/pesqdsp.o:/tmp/pip-install-b4hzkb01/pypesq_e9848519956f4b538b2373b159e56aef/pypesq/pesqdsp.c:136: first defined here collect2: error: ld returned 1 exit status error: command '/usr/bin/g++' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pypesq Running setup.py clean for pypesq Failed to build pypesq ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pypesq)
06-18
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值