Debian 9 上的 Vue.js 安裝問題

Debian 9 上的 Vue.js 安裝問題

我嘗試在 Debian 9 作業系統上安裝 Vue.js,但收到此錯誤訊息: Illegal instructions] - rollbackFailedOptional: verb npm-session 1fd93108cdc88b2

當我執行此命令時: npm 安裝 vue

npm的版本是6.13.7

我遇到了問題sudo apt-get 更新,這會導致以下錯誤:

Ign:25 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main DEP-11 64x64 Icons
Fetched 15.4 kB in 8s (1,813 B/s)                   
Reading package lists... Done
W: The repository 'http://ppa.launchpad.net/ondrej/php/ubuntu focal Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ppa.launchpad.net/webupd8team/brackets/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
W: The repository 'http://ppa.launchpad.net/webupd8team/brackets/ubuntu bionic InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/dists/focal/main/source/Sources  404  Not Found [IP: 91.189.95.83 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

我在 StackExchange 和網路上搜尋了此錯誤,並嘗試了相關的解決方案(沒有成功)

答案1

更改目錄,/etc/apt/sources.list.d然後刪除 Ondrej 和 Barckets PPA,同時刪除phpversion 和 barckets(軟體包屬於 Ubuntu Bionic 和 Focal)。

要安裝 Barckets,請下載 deb 文件從這裡

sudo apt install gdebi
wget https://github.com/adobe/brackets/releases/download/release-1.14.1/Brackets.Release.1.14.1.64-bit.deb
sudo gdebi Brackets.Release.1.14.1.64-bit.deb

若要新增 ondrej 儲存庫,請使用:

sudo apt install apt-transport-https lsb-release ca-certificates curl
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
printf "deb https://packages.sury.org/php/ $(lsb_release -sc) main" |sudo tee  /etc/apt/sources.list.d/php.list
sudo apt update

vuevue-cli安裝:

npm install -g npm
npm install -g vue
npm install -g @vue/cli

相關內容