所以这一切都是在我以某种方式破坏了python3时开始的,运行它(甚至只是repl)导致了以下错误:[1] <some four-digit number> Illegal hardware instruction python3
我决定尝试重新安装它。结果证明这是一个坏主意。由于错误太多,卸载过程停止,留下类似的错误消息。如果我尝试安装某些内容,apt-get
因错误太多而停止,即使我尝试安装已安装的内容
以下是示例错误消息:https://pastebin.com/dSp9ecuw
以下是错误消息的一部分,它具有相当的代表性(大多数情况只是这个但具有不同的包名称):
dpkg: error processing package python3-pkg-resources (--configure):
subprocess installed post-installation script returned error exit status 132
dpkg: dependency problems prevent configuration of python3-chardet:
python3-chardet depends on python3-pkg-resources; however:
Package python3-pkg-resources is not configured yet.
这也是最终结果:
dpkg: too many errors, stopping
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Errors were encountered while processing:
python3-apt
ubuntu-drivers-common
dh-python
python3-commandnotfound
python3-dbus
python3-gi
ufw
python3-pkg-resources
python3-chardet
...
(and so on for a bunch of packages)
...
python3-oneconf
sessioninstaller
Processing was halted because there were too many errors.
答案 0 :(得分:0)
运行以下命令字符串
// Middleware
// ================================================
const connectionConfig = buildConnectConfig(appConfig);
export const Middleware = {
fileApi: appConfig => getFileApi(connectionConfig)
};
// getFileApi
// ================================================
export const getFileApi = (config) => ({
getFile: getFile(config)
getFiles: getFiles(config)
});
// getFile
// ================================================
export const getFile = (config) => async (data) => {
const url = config.url;
// return await ...;
}
// buildConnect
// ================================================
export const buildConnectConfig = (appConfig) => {
const initalConfig = { /* ... */ };
return { // or Object.assign({}, ...)
...initalConfig,
...appConfig
};
}