etcher icon indicating copy to clipboard operation
etcher copied to clipboard

Ubuntu install orphaned path

Open emanuel4you opened this issue 3 years ago • 14 comments

... Setting up balena-etcher-electron (1.5.117) ... chmod: cannot access '/opt/balena-etcher-electron/chrome-sandbox': No such file or directory

emanuel4you avatar Apr 17 '21 21:04 emanuel4you

Yes, the postinst file is out of sync with the filesystem.

kbee@system76:~/tmp/etcher/control$ cat postinst
#!/bin/bash

# Link to the binary
ln -sf '/opt/balena-etcher-electron/balena-etcher-electron' '/usr/bin/balena-etcher-electron'

# SUID chrome-sandbox for Electron 5+
chmod 4755 '/opt/balena-etcher-electron/chrome-sandbox' || true

update-mime-database /usr/share/mime || true
update-desktop-database /usr/share/applications || true

kb2ma avatar May 03 '21 01:05 kb2ma

@thundron I'm also seeing this same error after following the instructions in #3051 (I'm running Ubuntu 18.04 LTS)

Need to get 86.8 MB of archives.
After this operation, 4,291 kB disk space will be freed.
Get:1 https://dl.cloudsmith.io/public/balena/etcher/deb/ubuntu bionic/main amd64 balena-etcher-electron amd64 1.5.117 [86.8 MB]
Fetched 86.8 MB in 7s (12.3 MB/s)                                              
(Reading database ... 589767 files and directories currently installed.)
Preparing to unpack .../balena-etcher-electron_1.5.117_amd64.deb ...
Unpacking balena-etcher-electron (1.5.117) over (1.5.100) ...
Setting up balena-etcher-electron (1.5.117) ...
chmod: cannot access '/opt/balena-etcher-electron/chrome-sandbox': No such file or directory
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...

However if I ls /opt I see that there is a /opt/balenaEtcher directory? And

$ ls -l /usr/bin/balena-etcher-electron 
lrwxrwxrwx 1 root root 50 May  3 08:10 /usr/bin/balena-etcher-electron -> /opt/balena-etcher-electron/balena-etcher-electron

is a broken symlink :confused:

lurch avatar May 03 '21 07:05 lurch

It looks like there is something wrong with the path. Following commands provided by @kb2ma above using /opt/balenaEtcheras directory works properly:

# Link to the binary
ln -sf '/opt/balenaEtcher/balena-etcher-electron' '/usr/bin/balena-etcher-electron'

# SUID chrome-sandbox for Electron 5+
chmod 4755 '/opt/balenaEtcher/chrome-sandbox' || true

update-mime-database /usr/share/mime || true
update-desktop-database /usr/share/applications || true

I guess this path is build using some sort of convention and the convention is broken.

@lurch @kb2ma Would you mind if I create a PR to solve this?

M3LiNdRu avatar May 04 '21 11:05 M3LiNdRu

No need to ask my permission! I don't work on this project, I'm just an "interested 3rd party" :wink:

lurch avatar May 04 '21 16:05 lurch

duplicated issue: https://github.com/balena-io/etcher/issues/3074

fix: https://github.com/balena-io/etcher/commit/d8cb8f78154910f46b70f4b2537d57169b1a0b60

M3LiNdRu avatar May 05 '21 14:05 M3LiNdRu

duplicated issue: #3074

Seems strange that a bug apparently fixed in Feb 2020 would still be affecting Etcher in May 2021? :confused: :man_shrugging:

lurch avatar May 05 '21 15:05 lurch

Is this issue fixed?

valdominic avatar May 24 '21 13:05 valdominic

Is this issue fixed?

It looks like the fix was released. However, .deb package still have the issue, so not sure what release is packaged inside the current .deb package.

@valdominic following the above steps provided by @kb2ma should fix the issue in my Debian

M3LiNdRu avatar May 25 '21 10:05 M3LiNdRu

@M3LiNdRu I've just taken a look at the issue you linked to, and I think that's a similar-but-different error. #3074 seems to be about a bug in the script used to start Etcher, whereas this issue is about a bug in the package used to install Etcher?

lurch avatar May 25 '21 11:05 lurch

Is this issue fixed?

It looks like the fix was released. However, .deb package still have the issue, so not sure what release is packaged inside the current .deb package.

@valdominic following the above steps provided by @kb2ma should fix the issue in my Debian

@M3LiNdRu , when i try to run the fix that @kb2ma has provided above, it gives me an error

Here is the error

bash: /home/debianbox/tmp/etcher/control$: No such file or directory

valdominic avatar May 28 '21 18:05 valdominic

I'm having this issue as well FYI.

Eratosthenes avatar Jul 06 '21 16:07 Eratosthenes

How is this still broken?

KernelDeimos avatar Dec 01 '21 06:12 KernelDeimos

Not sure, but i just tried uninstalling and reinstalling it again and still have getting the same 'chmod: cannot access '/opt/balena-etcher-electron/chrome-sandbox': No such file or directory' error.

Could this be the reason why my bootable USB is not working at boot time? It's showing up in explorer and i can work with the files. but it's not booting up my system with the loaded Distro.

cerosilva avatar Dec 06 '21 13:12 cerosilva

bumping this because the control file is STILL broken

scriptPath here is set incorrectly https://github.com/balena-io/etcher/blob/master/afterPack.js

theofficialgman avatar Mar 23 '22 04:03 theofficialgman

I just tried to install the apt package and this issue is still occuring. Is nobody working on this?

do-nat avatar Dec 11 '22 09:12 do-nat

I just tried to install the apt package and this issue is still occuring. Is nobody working on this?

@do-nat What linux distribution are you using?

FYI, not reproduced on Debian 11

M3LiNdRu avatar Dec 12 '22 16:12 M3LiNdRu

@M3LiNdRu I'm using PopOS, which is an Ubuntu derivate

do-nat avatar Dec 14 '22 11:12 do-nat

I just got this issue on a default install of Ubuntu 22.10

chmod: cannot access '/opt/balena-etcher-electron/chrome-sandbox': No such file or directory

It seems the actual folder is /opt/balenaEtcher/ and not ls -la /opt/balena-etcher-electron/

ls -la /opt/balenaEtcher/:

balena-etcher-electron.bin
chrome_100_percent.pak
chrome_200_percent.pak
chrome-sandbox
icudtl.dat
libEGL.so
libffmpeg.so
libGLESv2.so
libvk_swiftshader.so
libvulkan.so.1
LICENSE.electron.txt
LICENSES.chromium.html
locales
resources
resources.pak
snapshot_blob.bin
swiftshader
v8_context_snapshot.bin
vk_swiftshader_icd.json

suparious avatar Mar 05 '23 22:03 suparious