Comments (8)
Which Ubuntu version you are using? Could you please share the output you get for sudo bal -v
?
Please let us know whether the following solution works:
- Remove
~/.ballerina/ballerina-version
file - Try
bal -v
from ballerina-update-tool.
Its running on a debian:jessie
pod within a kubernetes cluster (an admin/quick test pod).
I just checked and ~/.ballerina/ballerina-version
does not exist:
ls ~/.ballerina/
Settings.toml repositories
from ballerina-update-tool.
Its running on a
debian:jessie
pod within a kubernetes cluster (an admin/quick test pod).I just checked and
~/.ballerina/ballerina-version
does not exist:ls ~/.ballerina/ Settings.toml repositories
When we issue bal dist use
, if the ballerina-version file is not there, it should be created. Could you please share the output you get for sudo bal -v
as well?
from ballerina-update-tool.
The pod is running as root and there is no out-of-the-box in debian:jessie
(not best practice to run a root level pod, I know
from ballerina-update-tool.
For what its worth I also tried this using ballerina/ballerina:latest
:
bash-5.0$ bal -v
Ballerina Swan Lake Alpha 4
Language specification v2020-12-17
Update Tool 1.3.1
bash-5.0$ bal dist pull 1.2.6
Fetching the '1.2.6' distribution from the remote server...
Downloading 1.2.6 100% [===========================================================] 110/110 MB (0:00:03 / 0:00:00)
Fetching the dependencies for '1.2.6' from the remote server...
Downloading jdk8u202-b08-jre 100% [==================================================] 39/39 MB (0:00:00 / 0:00:00)
'1.2.6' successfully set as the active distribution
bash-5.0$ bal dist list
/ballerina/runtime/bin/bal: line 54: /ballerina/runtime/bin/../dependencies/jdk8u202-b08-jre/bin/java: No such file or directory
bash-5.0$ bal -v
Error: Ballerina is supported only on JDK 1.8
/ballerina/runtime/bin/bal: line 105: /ballerina/runtime/bin/../dependencies/jdk8u202-b08-jre/bin/java: No such file or directory
bash-5.0$ bal dist use 1.2.6
/ballerina/runtime/bin/bal: line 54: /ballerina/runtime/bin/../dependencies/jdk8u202-b08-jre/bin/java: No such file or directory
bash-5.0$ ls /ballerina/runtime/dependencies/jdk8u202-b08-jre/bin/java
/ballerina/runtime/dependencies/jdk8u202-b08-jre/bin/java
bash-5.0$ ls -lah /ballerina/runtime/dependencies/jdk8u202-b08-jre/bin/java
-rwxrwxrwx 1 ballerin troupe 8.5K Apr 21 15:31 /ballerina/runtime/dependencies/jdk8u202-b08-jre/bin/java
bash-5.0$ id
uid=100(ballerina) gid=1000(troupe) groups=1000(troupe)
from ballerina-update-tool.
For what its worth I also tried this using
ballerina/ballerina:latest
:bash-5.0$ bal -v Ballerina Swan Lake Alpha 4 Language specification v2020-12-17 Update Tool 1.3.1 bash-5.0$ bal dist pull 1.2.6 Fetching the '1.2.6' distribution from the remote server... Downloading 1.2.6 100% [===========================================================] 110/110 MB (0:00:03 / 0:00:00) Fetching the dependencies for '1.2.6' from the remote server... Downloading jdk8u202-b08-jre 100% [==================================================] 39/39 MB (0:00:00 / 0:00:00) '1.2.6' successfully set as the active distribution bash-5.0$ bal dist list /ballerina/runtime/bin/bal: line 54: /ballerina/runtime/bin/../dependencies/jdk8u202-b08-jre/bin/java: No such file or directory bash-5.0$ bal -v Error: Ballerina is supported only on JDK 1.8 /ballerina/runtime/bin/bal: line 105: /ballerina/runtime/bin/../dependencies/jdk8u202-b08-jre/bin/java: No such file or directory bash-5.0$ bal dist use 1.2.6 /ballerina/runtime/bin/bal: line 54: /ballerina/runtime/bin/../dependencies/jdk8u202-b08-jre/bin/java: No such file or directory bash-5.0$ ls /ballerina/runtime/dependencies/jdk8u202-b08-jre/bin/java /ballerina/runtime/dependencies/jdk8u202-b08-jre/bin/java bash-5.0$ ls -lah /ballerina/runtime/dependencies/jdk8u202-b08-jre/bin/java -rwxrwxrwx 1 ballerin troupe 8.5K Apr 21 15:31 /ballerina/runtime/dependencies/jdk8u202-b08-jre/bin/java bash-5.0$ id uid=100(ballerina) gid=1000(troupe) groups=1000(troupe)
Seems the file is there and it has permissions as well.
from ballerina-update-tool.
Is there any specific use case for switching distribution within a pod? If you want only 1.2.6, then you can try using ballerina/ballerina:1.2.6
.
from ballerina-update-tool.
@jimk-osu
Thank you reporting this. We have review packing update tool in docker image and since there are issues in the environment and make it simple, we have decided to remove update tool functionality from ballerina image. Therefore now we cannot use ballerina update tool commands in docker and we need to use docker ballerina image versions in order to switch in between.
I will be closing the issue, please feel free to reopen if there are any concerns
from ballerina-update-tool.
Related Issues (20)
- Can't switch back to 2201.0.0-rc1 after switching to an older version
- `bal version` command returned a Permission denied error HOT 1
- Current version (not published) is not showing as installed in `bal dist list` HOT 1
- `bal dist pull` command is not working properly in github actions on centos HOT 1
- bal dist pull/use doesn't activate the distribution HOT 2
- Upgrade Gradle wrapper version
- Improve code coverage
- Installing Ballerina with Ubuntu Software Store isn't working as expected HOT 2
- Update tools does not pull distributions HOT 5
- Include integrity checks
- Update tool pointing to 2201.0.5 as the latest HOT 2
- Unexpected error when using dist pull HOT 2
- Need to update batch files with latest dependencies. HOT 1
- [Bug]: Ballerina resource path escape characters present in Observability data HOT 1
- [Bug]: Null pointer exception when generating docs HOT 1
- [Bug]: `bal dist list` command is not showing latest distributions HOT 2
- Improve local disttribution in dist list HOT 1
- [Bug]: Updating to SL update 3 broke bal command for me WSL2 + Ubuntu
- Update test cases to check for exact output
- Introduce a new approach to renew the shell script while updating the tool HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ballerina-update-tool.