Closed Download closed 4 years ago
The error suggests we don't have permissions to the directory we are unpacking to. Can you check if get the same error on a fresh project created with mix new
and a hex dependency?
$ mix new
asdf: No version set for command mix
you might want to add one of the following in your .tool-versions file:
elixir 1.8.1-otp-21
I have asdf
in the 'mix' (lol) as well it seems.
I made a new folder manually and created a .tool-versions file in it, then ran mix new
inside the new folder, which eventually I got to work:
stijn@DESKTOP-3I7O7CL:/mnt/c/ws$ mkdir hex
stijn@DESKTOP-3I7O7CL:/mnt/c/ws$ cd hex
stijn@DESKTOP-3I7O7CL:/mnt/c/ws/hex$ explorer.exe .
stijn@DESKTOP-3I7O7CL:/mnt/c/ws/hex$ mix new
asdf: No version set for command erl
you might want to add one of the following in your .tool-versions file:
erlang 21.0.6
stijn@DESKTOP-3I7O7CL:/mnt/c/ws/hex$ mix new
** (Mix) Expected PATH to be given, please use "mix new PATH"
stijn@DESKTOP-3I7O7CL:/mnt/c/ws/hex$ mix new .
** (Mix) Module name Hex is already taken, please choose another name
stijn@DESKTOP-3I7O7CL:/mnt/c/ws/hex$ mix new myproject
* creating README.md
* creating .formatter.exs
* creating .gitignore
* creating mix.exs
* creating config
* creating config/config.exs
* creating lib
* creating lib/myproject.ex
* creating test
* creating test/test_helper.exs
* creating test/myproject_test.exs
Your Mix project was created successfully.
You can use "mix" to compile it, test it, and more:
cd myproject
mix test
Run "mix help" for more commands.
Ok so I tried to change ownership of the project folder, but it does not help:
stijn@DESKTOP-3I7O7CL:/mnt/c/ws$ sudo chown -R stijn /mnt/c/ws/worldviews
[sudo] password for stijn:
stijn@DESKTOP-3I7O7CL:/mnt/c/ws$ cd worldviews
stijn@DESKTOP-3I7O7CL:/mnt/c/ws/worldviews$ mix deps.get
Resolving Hex dependencies...
Dependency resolution completed:
Unchanged:
bamboo 1.3.0
bamboo_smtp 2.0.0
certifi 2.5.1
combine 0.10.0
connection 1.0.4
cowboy 2.6.3
cowlib 2.7.3
db_connection 2.1.1
decimal 1.8.0
ecto 3.2.1
ecto_sql 3.2.0
file_system 0.2.7
gen_smtp 0.14.0
gettext 0.17.0
hackney 1.15.1
hound 1.1.0
idna 6.0.0
jason 1.1.2
metrics 1.0.1
mime 1.3.1
mimerl 1.2.0
nanoid 2.0.2
parse_trans 3.3.0
phoenix 1.4.6
phoenix_ecto 4.0.0
phoenix_html 2.13.3
phoenix_live_reload 1.2.1
phoenix_pubsub 1.1.2
plug 1.8.3
plug_cowboy 2.1.0
plug_crypto 1.0.0
postgrex 0.15.1
ranch 1.7.1
rollbax 0.11.0
ssl_verify_fun 1.1.4
telemetry 0.4.0
timex 3.6.1
tzdata 1.0.1
unicode_util_compat 0.4.1
* Updating phoenix (Hex package)
** (Mix) Unpacking tarball failed: inner tarball error, not owner
Any idea what user should be owner for this to work?
It suddenly dawned on me that I should add the right dependencies to actually test what you asked me to test... so I copied the deps section from the original project to the new project:
/mnt/c/ws/hex/myproject/mix.exs
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:phoenix, "1.4.6"},
{:phoenix_pubsub, "~> 1.1"},
{:phoenix_ecto, "~> 4.0"},
{:ecto_sql, "~> 3.0"},
{:postgrex, ">= 0.0.0"},
{:phoenix_html, "~> 2.11"},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:gettext, "~> 0.11"},
{:jason, "~> 1.0"},
{:plug_cowboy, "~> 2.0"},
{:hound, "~> 1.0", only: :test},
{:rollbax, "~> 0.10"},
{:bamboo, "~> 1.3"},
{:bamboo_smtp, "~> 2.0"},
{:nanoid, "~> 2.0"},
{:timex, "~> 3.5"}
]
end
I then ran mix deps.get
again, and got the same error:
stijn@DESKTOP-3I7O7CL:/mnt/c/ws/hex/myproject$ mix deps.get
Resolving Hex dependencies...
Dependency resolution completed:
New:
bamboo 1.3.0
bamboo_smtp 2.1.0
certifi 2.5.1
combine 0.10.0
connection 1.0.4
cowboy 2.7.0
cowlib 2.8.0
db_connection 2.1.1
decimal 1.8.0
ecto 3.2.3
ecto_sql 3.2.0
file_system 0.2.7
gen_smtp 0.15.0
gettext 0.17.0
hackney 1.15.2
hound 1.1.0
idna 6.0.0
jason 1.1.2
metrics 1.0.1
mime 1.3.1
mimerl 1.2.0
nanoid 2.0.2
parse_trans 3.3.0
phoenix 1.4.6
phoenix_ecto 4.0.0
phoenix_html 2.13.3
phoenix_live_reload 1.2.1
phoenix_pubsub 1.1.2
plug 1.8.3
plug_cowboy 2.1.0
plug_crypto 1.0.0
postgrex 0.15.1
ranch 1.7.1
rollbax 0.11.0
ssl_verify_fun 1.1.5
telemetry 0.4.0
timex 3.6.1
tzdata 1.0.2
unicode_util_compat 0.4.1
* Getting phoenix (Hex package)
** (Mix) Unpacking tarball failed: inner tarball error, not owner
I am on Microsoft Windows v 10.0.18362.418 BTW.
@ericmj
So, instead of using a mounted drive (/mnt/c/ws/some-folder
) I used the home directory of the Ubuntu installation. I git cloned the project to there and ran asdf install
and then mix deps.get
and all worked fine. So it seems to be some issue with mounted drives.
We have noticed tarballs with symlinks can have issues on Windows so that is worth looking into for people have have this issue. The Hex team cannot reproduce this issue so we are closing it for now. If you have more information please post it here or open a new issue. Thank your for the report!
For my case I was working on WSL Ubuntu, everything was working fine
Then I moved from WSL Ubuntu to WSL Debian
I tried to compile a project that I created on WSL Ubuntu,
** (Mix) Unpacking tarball failed: inner tarball error, not owner
If that helps to reproduce the issue
I have been reading up on #624 . The issue I am having seems very similar but still different enough to warrant a separate issue. I am very new to unix development and trying to use hex as a dependency of a dependency of a project I am working on, so my apologies beforehand if I messed this up and posted to the wrong repo.
I am getting this output when I try to run
mix deps.get
:I am running the command on Windows 10, using Ubuntu 18.04 LTS installed from the Microsoft Store, on Windows Subsystem for Linux (WSL).