devcontainers / devcontainers/features

Python feature (os-provided) installation failed if python already installed

Aperta
#222 1 commento 1 reazione 0 assegnatari Vedi su GitHub
bug
Lingua principale
Shell
Stelle
1.5k
Fork
621
Merge medio
6g 53m
PR unite (30g)
9

Descrizione

When I tried to install Python on the rust image, the build failed with an error because it could not create a symbolic link.

```log
#0 48.02 ln: failed to create symbolic link '/usr/bin/python': File exists
#0 48.02 ERROR: Feature "Python" (ghcr.io/devcontainers/features/python) failed to install! Look at the documentation at https://github.com/devcontainers/features/tree/main/src/python for help troubleshooting this error.
```

My devcontainer.json is this.

```json
{
"name": "${localWorkspaceFolderBasename}",
"image": "mcr.microsoft.com/devcontainers/rust:1",
"runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"],

"customizations": {
"vscode": {
"settings": {
"lldb.executable": "/usr/bin/lldb",
"files.watcherExclude": {
"**/target/**": true
},
"rust-analyzer.checkOnSave.command": "clippy"
},
"extensions": [
"vadimcn.vscode-lldb",
"mutantdino.resourcemonitor",
"rust-lang.rust-analyzer",
"tamasfe.even-better-toml",
"serayuzgur.crates"
]
}
},
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/python:1": {}
}
}
```

Overwrite the symbolic link, or, I think it is better to stop with an error immediately after executing the script (instead of stopping after some time has passed)

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con la documentazione della feature Python collegata nell’errore e riproduci il problema usando il devcontainer.json e l’immagine Rust forniti. Segui il punto di ingresso dell’installazione della feature relativo alla creazione di /usr/bin/python, quindi verifica che il comportamento scelto gestisca il collegamento simbolico esistente oppure segnali immediatamente il conflitto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
docker, python, shell
Ambito
devops, infrastructure
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.