Discussion:
[ocaml-platform] opam update problem
Bruce Butterfield
2015-07-22 22:17:39 UTC
Permalink
I'm unable to run 'opam update' -- I get an error message "Could not update repository default". Running it with debug flag:

$ opam update --debug
...
Processing 1/1: [default: http]
00:00.397 PARALLEL Collected task for job 0 (ret:256)
00:00.397 SYSTEM rmdir /var/folders/6p/sf2lk3297kb9sl_tpq6tckcw0000gn/T/opam-90980-dd682e
00:00.403 SYSTEM Could not download file at https://opam.ocaml.org/urls.txt.
[ERROR] Could not update repository default
...

The period at the end of the URL is suspicious but I have no idea why it is there or if that is the problem. Any ideas?
Thomas Gazagnaire
2015-07-22 22:19:36 UTC
Permalink
Post by Bruce Butterfield
$ opam update --debug
...
Processing 1/1: [default: http]
00:00.397 PARALLEL Collected task for job 0 (ret:256)
00:00.397 SYSTEM rmdir /var/folders/6p/sf2lk3297kb9sl_tpq6tckcw0000gn/T/opam-90980-dd682e
00:00.403 SYSTEM Could not download file at https://opam.ocaml.org/urls.txt.
[ERROR] Could not update repository default
...
The period at the end of the URL is suspicious but I have no idea why it is there or if that is the problem. Any ideas?
Can you access that url using curl or wget?

Thomas
Bruce Butterfield
2015-07-22 22:20:59 UTC
Permalink
I can if it doesn't have the '.' at the end of the URI.
Post by Thomas Gazagnaire
Post by Bruce Butterfield
$ opam update --debug
...
Processing 1/1: [default: http]
00:00.397 PARALLEL Collected task for job 0 (ret:256)
00:00.397 SYSTEM rmdir /var/folders/6p/sf2lk3297kb9sl_tpq6tckcw0000gn/T/opam-90980-dd682e
00:00.403 SYSTEM Could not download file at https://opam.ocaml.org/urls.txt.
[ERROR] Could not update repository default
...
The period at the end of the URL is suspicious but I have no idea why it is there or if that is the problem. Any ideas?
Can you access that url using curl or wget?
Thomas
Thomas Gazagnaire
2015-07-23 07:29:46 UTC
Permalink
Post by Bruce Butterfield
I can if it doesn't have the '.' at the end of the URI.
This is just pretty-printing.

Try with -vv to see what command opam actually uses. It might be an issue with your version of curl. And maybe move the discussion to the issue tracker on GitHub[1] where it would be tracked more easily.

Best,
Thomas

[1]: https://github.com/ocaml/opam/issues
Post by Bruce Butterfield
Post by Thomas Gazagnaire
Post by Bruce Butterfield
$ opam update --debug
...
Processing 1/1: [default: http]
00:00.397 PARALLEL Collected task for job 0 (ret:256)
00:00.397 SYSTEM rmdir /var/folders/6p/sf2lk3297kb9sl_tpq6tckcw0000gn/T/opam-90980-dd682e
00:00.403 SYSTEM Could not download file at https://opam.ocaml.org/urls.txt.
[ERROR] Could not update repository default
...
The period at the end of the URL is suspicious but I have no idea why it is there or if that is the problem. Any ideas?
Can you access that url using curl or wget?
Thomas
Francois Berenger
2015-07-23 07:49:32 UTC
Permalink
Post by Thomas Gazagnaire
Post by Bruce Butterfield
I can if it doesn't have the '.' at the end of the URI.
This is just pretty-printing.
Try with -vv to see what command opam actually uses. It might be an issue with your version of curl. And maybe move the discussion to the issue tracker on GitHub[1] where it would be tracked more easily.
Sometimes uninstalling curl and installing wget is a workaround for such
problems.

However, I am not sure if opam supports wget.
Post by Thomas Gazagnaire
Best,
Thomas
[1]: https://github.com/ocaml/opam/issues
Post by Bruce Butterfield
Post by Thomas Gazagnaire
Post by Bruce Butterfield
$ opam update --debug
...
Processing 1/1: [default: http]
00:00.397 PARALLEL Collected task for job 0 (ret:256)
00:00.397 SYSTEM rmdir /var/folders/6p/sf2lk3297kb9sl_tpq6tckcw0000gn/T/opam-90980-dd682e
00:00.403 SYSTEM Could not download file at https://opam.ocaml.org/urls.txt.
[ERROR] Could not update repository default
...
The period at the end of the URL is suspicious but I have no idea why it is there or if that is the problem. Any ideas?
Can you access that url using curl or wget?
Thomas
_______________________________________________
Platform mailing list
http://lists.ocaml.org/listinfo/platform
--
Regards,
Francois.
"When in doubt, use more types"
Louis Gesbert
2015-07-23 07:59:02 UTC
Permalink
It does. You may even specify any custom command through the OPAMFETCH variable with the most recent versions. `OPAMFETCH=wget` works without having to uninstall curl.
- Francois Berenger, 23/07/2015 09:49 -
Post by Thomas Gazagnaire
Post by Bruce Butterfield
I can if it doesn't have the '.' at the end of the URI.
This is just pretty-printing.
Try with -vv to see what command opam actually uses. It might be an issue with your version of curl. And maybe move the discussion to the issue tracker on GitHub[1] where it would be tracked more easily.
Sometimes uninstalling curl and installing wget is a workaround for such
problems.
However, I am not sure if opam supports wget.
Post by Thomas Gazagnaire
Best,
Thomas
[1]: https://github.com/ocaml/opam/issues
Post by Bruce Butterfield
Post by Thomas Gazagnaire
Post by Bruce Butterfield
$ opam update --debug
...
Processing 1/1: [default: http]
00:00.397 PARALLEL Collected task for job 0 (ret:256)
00:00.397 SYSTEM rmdir /var/folders/6p/sf2lk3297kb9sl_tpq6tckcw0000gn/T/opam-90980-dd682e
00:00.403 SYSTEM Could not download file at https://opam.ocaml.org/urls.txt.
[ERROR] Could not update repository default
...
The period at the end of the URL is suspicious but I have no idea why it is there or if that is the problem. Any ideas?
Can you access that url using curl or wget?
Thomas
_______________________________________________
Platform mailing list
http://lists.ocaml.org/listinfo/platform
Bruce Butterfield
2015-07-23 16:04:01 UTC
Permalink
OK, that isolated the problem:

butterfield-mba:~ bruce$ opam update -vv

=-=- Updating package repositories =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
[default: http] Command started
+ wget "--content-disposition" "--no-check-certificate" "-t" "3" "https://opam.ocaml.org/urls.txt" (CWD=/var/folders/6p/sf2lk3297kb9sl_tpq6tckcw0000gn/T/opam-3244-dd682e)
- dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
- Referenced from: /usr/local/bin/wget
- Reason: image not found
[ERROR] Could not update repository default
^C'opam update -vv' failed.
butterfield-mba:~ bruce$

Just a problem loading a shared lib. That I can fix. Thanks!
Post by Thomas Gazagnaire
Post by Bruce Butterfield
I can if it doesn't have the '.' at the end of the URI.
This is just pretty-printing.
Try with -vv to see what command opam actually uses. It might be an issue with your version of curl. And maybe move the discussion to the issue tracker on GitHub[1] where it would be tracked more easily.
Best,
Thomas
[1]: https://github.com/ocaml/opam/issues
Post by Bruce Butterfield
Post by Thomas Gazagnaire
Post by Bruce Butterfield
$ opam update --debug
...
Processing 1/1: [default: http]
00:00.397 PARALLEL Collected task for job 0 (ret:256)
00:00.397 SYSTEM rmdir /var/folders/6p/sf2lk3297kb9sl_tpq6tckcw0000gn/T/opam-90980-dd682e
00:00.403 SYSTEM Could not download file at https://opam.ocaml.org/urls.txt.
[ERROR] Could not update repository default
...
The period at the end of the URL is suspicious but I have no idea why it is there or if that is the problem. Any ideas?
Can you access that url using curl or wget?
Thomas
Shon Feder
2015-10-23 02:16:59 UTC
Permalink
In case this will save some future people some future time:

I seemed to be experiencing a similar, bot not identical problem.
I had the following setup:

- OS X: v 10.11
- OPAM: v 1.2.2_1
- wget: v 1.13.4

and when I attempted to update opam it looked like this:

```
$ opam update

=-=- Updating package repositories =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
[ERROR] Could not update repository default
```

By following this thread, I got as far as running `opam update -vv`,
but I did not receive the same illuminating information as OP. Instead
I had this result:

[default: http] Command started
+ wget "--content-disposition" "--no-check-certificate" "-t" "3"
"https://opam.ocaml.org/1.1/urls.txt"
(CWD=/var/folders/45/45fn42f929169glfv0_ngbrw0000gp/T/opam-21935-dd682e)
- Usage: wget [OPTION]... [URL]...
-
- Try `wget --help' for more options.
[ERROR] Could not update repository default

tbh, I don't know what it was trying to indicate, but I guessed it was
an issue with wget. I checked http://ftp.gnu.org/gnu/wget/ and learned
wget 1.13.4 was no longer current. So I ran

```
$ brew update
$ brew install wget
```

Which upgraded me to the latest version (1.16.3, at the time I write this).
Afterwards, `opam update` worked without a problem.

Thanks to all you problem solvers in this thread who helped me get this far. :)
Loading...